public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen•de>
To: Andy Zhou <azhou@nicira•com>
Cc: davem@davemloft•net, netdev@vger•kernel.org
Subject: Re: [net-next fragmenation icmp v2 1/2] bridge_netfilter: No ICMP packet on IPv4 defragmentation timeout
Date: Thu, 7 May 2015 04:07:19 +0200	[thread overview]
Message-ID: <20150507020719.GG21713@breakpoint.cc> (raw)
In-Reply-To: <1430962033-16141-2-git-send-email-azhou@nicira.com>

Andy Zhou <azhou@nicira•com> wrote:
> Currently, on defragmentation timeout error, ICMP error message
> will be generated. This is fine when they are used in a routing context,
> but does not make sense in the context of bridging netfilter.
> 
> This patch adds a bit (IPSKB_NO_FRAG_ICMP) in IPCB to control
> whether ICMP error message should be generated. br_netfiler sets
> this bit.

Why not use qp->user to make this decision for bridge too?

> diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
> index cc1da6d..447d9ec 100644
> --- a/net/ipv4/ip_fragment.c
> +++ b/net/ipv4/ip_fragment.c
> @@ -217,7 +217,8 @@ static void ip_expire(unsigned long arg)
>  		/* Only an end host needs to send an ICMP
>  		 * "Fragment Reassembly Timeout" message, per RFC792.
>  		 */
> -		if (qp->user == IP_DEFRAG_AF_PACKET ||
>  		    ((qp->user >= IP_DEFRAG_CONNTRACK_IN) &&
>  		     (qp->user <= __IP_DEFRAG_CONNTRACK_IN_END) ||

  		    ((qp->user >= IP_DEFRAG_CONNTRACK_BRIDGE_IN) &&
  		     (qp->user <= __IP_DEFRAG_CONNTRACK_BRIDGE_IN) &&


[ This if cascade is getting silly, might make sense to add
 'static bool should_send_icmp(enum ip_defrag_users users)', move if
 tests there and then just

if (should_send_icmp(qp->user) && skb_rtable( ...)

  reply	other threads:[~2015-05-07  2:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-07  1:27 [net-next fragmenation icmp v2 0/2] fragmentation ICMP Andy Zhou
2015-05-07  1:27 ` [net-next fragmenation icmp v2 1/2] bridge_netfilter: No ICMP packet on IPv4 defragmentation timeout Andy Zhou
2015-05-07  2:07   ` Florian Westphal [this message]
2015-05-07 20:09     ` Andy Zhou
2015-05-07  1:27 ` [net-next fragmenation icmp v2 2/2] bridge_netfilter: No ICMP packet on IPv4 fragmentation error Andy Zhou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150507020719.GG21713@breakpoint.cc \
    --to=fw@strlen$(echo .)de \
    --cc=azhou@nicira$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox