From: Andy Zhou <azhou@nicira.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [net-next fragmenation icmp 1/2] ipv4_fragment: Add a bit in IPCB to control ICMP generation
Date: Wed, 6 May 2015 14:12:34 -0700 [thread overview]
Message-ID: <CACzMAJJ7AEmC4aGShrc0sCkotLD7_TxhQwPUm1sdVdcNFNic-A@mail.gmail.com> (raw)
In-Reply-To: <1430915034.14545.32.camel@edumazet-glaptop2.roam.corp.google.com>
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@gmail.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@nicira.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;
>
>
>
next prev parent reply other threads:[~2015-05-06 21:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-06 1:59 [fragmentation ICMP 0/2] fragmentation ICMP Andy Zhou
2015-05-06 1:59 ` [net-next fragmenation icmp 1/2] ipv4_fragment: Add a bit in IPCB to control ICMP generation Andy Zhou
2015-05-06 12:23 ` Eric Dumazet
2015-05-06 21:12 ` Andy Zhou [this message]
2015-05-06 1:59 ` [net-next fragmenation icmp 2/2] bridge: do not send icmp on fragmentation or defragmentation 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=CACzMAJJ7AEmC4aGShrc0sCkotLD7_TxhQwPUm1sdVdcNFNic-A@mail.gmail.com \
--to=azhou@nicira.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).