[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACzMAJ+qG0AuWnKDSsRtmq1L2AWoHxvwnDXa6qozMUFdLkrpxg@mail.gmail.com>
Date: Thu, 7 May 2015 13:09:06 -0700
From: Andy Zhou <azhou@...ira.com>
To: Florian Westphal <fw@...len.de>
Cc: David Miller <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [net-next fragmenation icmp v2 1/2] bridge_netfilter: No ICMP
packet on IPv4 defragmentation timeout
On Wed, May 6, 2015 at 7:07 PM, Florian Westphal <fw@...len.de> wrote:
> Andy Zhou <azhou@...ira.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?
>
O.K. Will do
>> 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( ...)
Good idea, will do.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists