From: Nicolas Dichtel <nicolas.dichtel@6wind•com>
To: Romain KUNTZ <r.kuntz@ipflavors•com>
Cc: netdev@vger•kernel.org, yoshfuji@linux-ipv6•org,
davem@davemloft•net,
Steffen Klassert <steffen.klassert@secunet•com>
Subject: Re: [PATCH 2/2] ipv6: fix packet corruption when Dest/RT2 options are used
Date: Mon, 07 Jan 2013 11:49:51 +0100 [thread overview]
Message-ID: <50EAA84F.90408@6wind.com> (raw)
In-Reply-To: <C7895CAA-0AF7-4EED-B9E7-9D8E4A21442B@ipflavors.com>
Le 05/01/2013 17:19, Romain KUNTZ a écrit :
> Commit 299b0767 (ipv6: Fix IPsec slowpath fragmentation problem)
Add Steffen into CC, he is the author of this patch and the IPsec
maintainer.
> has introduced a bug that provokes corrupted packets when Destination
> Options or Routing Header Type 2 are used (such as with Mobile IPv6):
> rt->rt6i_nfheader_len should be substracted to rt->dst.header_len,
> and not to exthdrlen.
>
> This patch reverts to the original and correct behavior. Successfully
> tested with and without IPsec activated for MH packets.
>
> Signed-off-by: Romain Kuntz <r.kuntz@ipflavors•com>
> ---
> net/ipv6/ip6_output.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
> index 5552d13..0c7c03d 100644
> --- a/net/ipv6/ip6_output.c
> +++ b/net/ipv6/ip6_output.c
> @@ -1213,10 +1213,10 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
> if (dst_allfrag(rt->dst.path))
> cork->flags |= IPCORK_ALLFRAG;
> cork->length = 0;
> - exthdrlen = (opt ? opt->opt_flen : 0) - rt->rt6i_nfheader_len;
> + exthdrlen = (opt ? opt->opt_flen : 0);
> length += exthdrlen;
> transhdrlen += exthdrlen;
> - dst_exthdrlen = rt->dst.header_len;
> + dst_exthdrlen = rt->dst.header_len - rt->rt6i_nfheader_len;
> } else {
> rt = (struct rt6_info *)cork->dst;
> fl6 = &inet->cork.fl.u.ip6;
>
next prev parent reply other threads:[~2013-01-07 10:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-05 16:13 [PATCH 1/2] ipv6: avoid blackhole and prohibited entries upon prefix purge Romain KUNTZ
2013-01-05 16:19 ` [PATCH 2/2] ipv6: fix packet corruption when Dest/RT2 options are used Romain KUNTZ
2013-01-07 10:49 ` Nicolas Dichtel [this message]
2013-01-07 12:41 ` Steffen Klassert
2013-01-11 7:27 ` Romain KUNTZ
2013-01-14 7:21 ` Romain KUNTZ
2013-01-05 19:59 ` [PATCH 1/2] ipv6: avoid blackhole and prohibited entries upon prefix purge Eric Dumazet
2013-01-05 21:44 ` [PATCH 1/2] ipv6: avoid blackhole and prohibited entries upon prefix purge [v2] Romain KUNTZ
2013-01-07 10:25 ` Nicolas Dichtel
2013-01-07 11:30 ` Romain KUNTZ
2013-01-07 15:43 ` Nicolas Dichtel
2013-01-08 11:38 ` Romain KUNTZ
2013-01-08 16:22 ` Nicolas Dichtel
2013-01-08 17:18 ` YOSHIFUJI Hideaki
2013-01-09 14:37 ` [PATCH 1/2] ipv6: avoid blackhole and prohibited entries upon prefix purge [v3] Romain KUNTZ
2013-01-09 15:11 ` Nicolas Dichtel
2013-01-10 7:06 ` Romain KUNTZ
2013-01-10 9:44 ` [PATCH 1/1] ipv6: use addrconf_get_prefix_route for prefix route lookup [v2] (was [PATCH 1/2] ipv6: avoid blackhole and prohibited entries upon prefix purge [v3]) YOSHIFUJI Hideaki
2013-01-10 22:39 ` [PATCH 1/1] ipv6: use addrconf_get_prefix_route for prefix route lookup [v2] David Miller
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=50EAA84F.90408@6wind.com \
--to=nicolas.dichtel@6wind$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
--cc=r.kuntz@ipflavors$(echo .)com \
--cc=steffen.klassert@secunet$(echo .)com \
--cc=yoshfuji@linux-ipv6$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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