[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACzMAJJ7AEmC4aGShrc0sCkotLD7_TxhQwPUm1sdVdcNFNic-A@mail.gmail.com>
Date: Wed, 6 May 2015 14:12:34 -0700
From: Andy Zhou <azhou@...ira.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: David Miller <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [net-next fragmenation icmp 1/2] ipv4_fragment: Add a bit in IPCB
to control ICMP generation
Since I only need 1 bit for this, I can probably define and use one
more bit in the 'flags' field above.
Thanks for the review. I will send out a 'v2'.
On Wed, May 6, 2015 at 5:23 AM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> On Tue, 2015-05-05 at 18:59 -0700, Andy Zhou wrote:
>> Currently, on fragmentation or defragmentation error, ICMP error message
>> can be generated. This is fine when they are used in a routing context,
>> but does not make sense when they are used in a bridging context, i.e.
>> netfilter for bridging.
>>
>> This patch adds a bit in IPCB to control whether ICMP error message
>> should be generated.
>>
>> IPV6 fragmentation and defragmentation functions are not reused by
>> bridge netfilter. Thus, this change is only required for IPV4.
>>
>> Signed-off-by: Andy Zhou <azhou@...ira.com>
>> ---
>> include/net/inet_frag.h | 2 ++
>> include/net/ip.h | 1 +
>> net/ipv4/ip_fragment.c | 11 ++++++++++-
>> net/ipv4/ip_output.c | 5 +++--
>> 4 files changed, 16 insertions(+), 3 deletions(-)
>>
>> diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h
>> index 8d17655..1d57045 100644
>> --- a/include/net/inet_frag.h
>> +++ b/include/net/inet_frag.h
>> @@ -44,6 +44,7 @@ enum {
>> * @meat: length of received fragments so far
>> * @flags: fragment queue flags
>> * @max_size: (ipv4 only) maximum received fragment size with IP_DF set
>> + * @no_icmp: Do not generate any fragmentation related icmp packet
>> * @net: namespace that this frag belongs to
>> */
>> struct inet_frag_queue {
>> @@ -58,6 +59,7 @@ struct inet_frag_queue {
>> int meat;
>> __u8 flags;
>> u16 max_size;
>> + bool no_icmp;
>> struct netns_frags *net;
>> };
>>
>
>
> What about filling the 8bit hole ?
>
> int meat;
> __u8 flags;
> + bool no_icmp;
> u16 max_size;
> struct netns_frags *net;
>
>
>
--
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