From: David Ahern <dsahern@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>, davem@davemloft.net
Cc: netdev@vger.kernel.org, yoshfuji@linux-ipv6.org,
dsahern@kernel.org, vfedorenko@novek.ru
Subject: Re: [PATCH net] ip6_tunnel: fix GRE6 segmentation
Date: Mon, 21 Jun 2021 22:28:05 -0600 [thread overview]
Message-ID: <33902f8c-e14a-7dc6-9bde-4f8f168505b5@gmail.com> (raw)
In-Reply-To: <20210622015254.1967716-1-kuba@kernel.org>
On 6/21/21 7:52 PM, Jakub Kicinski wrote:
> Commit 6c11fbf97e69 ("ip6_tunnel: add MPLS transmit support")
> moved assiging inner_ipproto down from ipxip6_tnl_xmit() to
> its callee ip6_tnl_xmit(). The latter is also used by GRE.
>
> Since commit 38720352412a ("gre: Use inner_proto to obtain inner
> header protocol") GRE had been depending on skb->inner_protocol
> during segmentation. It sets it in gre_build_header() and reads
> it in gre_gso_segment(). Changes to ip6_tnl_xmit() overwrite
> the protocol, resulting in GSO skbs getting dropped.
>
> Note that inner_protocol is a union with inner_ipproto,
> GRE uses the former while the change switched it to the latter
> (always setting it to just IPPROTO_GRE).
>
> Restore the original location of skb_set_inner_ipproto(),
> it is unclear why it was moved in the first place.
>
> Fixes: 6c11fbf97e69 ("ip6_tunnel: add MPLS transmit support")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> net/ipv6/ip6_tunnel.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
would be good to capture the GRE use case that found the bug and the
MPLS version as test cases under tools/testing/selftests/net. Both
should be doable using namespaces.
next prev parent reply other threads:[~2021-06-22 4:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-22 1:52 [PATCH net] ip6_tunnel: fix GRE6 segmentation Jakub Kicinski
2021-06-22 1:58 ` Vadim Fedorenko
2021-06-22 4:28 ` David Ahern [this message]
2021-06-22 22:24 ` Jakub Kicinski
2021-06-23 3:47 ` David Ahern
2021-06-23 16:14 ` Jakub Kicinski
2021-06-23 18:28 ` David Ahern
2021-06-24 13:39 ` Guillaume Nault
2021-06-24 14:36 ` David Ahern
2021-06-24 16:33 ` Jakub Kicinski
2021-06-22 17:40 ` patchwork-bot+netdevbpf
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=33902f8c-e14a-7dc6-9bde-4f8f168505b5@gmail.com \
--to=dsahern@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vfedorenko@novek.ru \
--cc=yoshfuji@linux-ipv6.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).