[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201007075807.4eb064c4@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Wed, 7 Oct 2020 07:58:07 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Hangbin Liu <liuhangbin@...il.com>
Cc: netdev@...r.kernel.org, "David S . Miller" <davem@...emloft.net>,
Alexey Kuznetsov <kuznet@....inr.ac.ru>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH net 2/2] IPv6: reply ICMP error if the first fragment
don't include all headers
On Wed, 7 Oct 2020 11:55:02 +0800 Hangbin Liu wrote:
> Based on RFC 8200, Section 4.5 Fragment Header:
>
> - If the first fragment does not include all headers through an
> Upper-Layer header, then that fragment should be discarded and
> an ICMP Parameter Problem, Code 3, message should be sent to
> the source of the fragment, with the Pointer field set to zero.
>
> As the packet may be any kind of L4 protocol, I only checked if there
> has Upper-Layer header by pskb_may_pull(skb, offset + 1).
>
> As the 1st truncated fragment may also be ICMP message, I also add
> a check in ICMP code is_ineligible() to let fragment packet with nexthdr
> ICMP but no ICMP header return false.
>
> Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
net/ipv6/icmp.c:159:65: warning: incorrect type in argument 4 (different base types)
net/ipv6/icmp.c:159:65: expected unsigned short *fragoff
net/ipv6/icmp.c:159:65: got restricted __be16 *
Powered by blists - more mailing lists