From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Xin Long <lucien.xin@gmail.com>
Cc: network dev <netdev@vger.kernel.org>, Gao feng <gaofeng@cn.fujitsu.com>
Subject: Re: [PATCH] ipv6: ip6_append_data_mtu do not handle the mtu of the second fragment properly
Date: Tue, 11 Mar 2014 15:49:06 +0100 [thread overview]
Message-ID: <20140311144906.GA29404@order.stressinduktion.org> (raw)
In-Reply-To: <1394512309-8823-1-git-send-email-lucien.xin@gmail.com>
On Tue, Mar 11, 2014 at 12:31:49PM +0800, Xin Long wrote:
> - *mtu = min(*mtu, pmtuprobe ?
> - rt->dst.dev->mtu :
> - dst_mtu(rt->dst.path));
> + *mtu = pmtuprobe ? rt->dst.dev->mtu :
> + dst_mtu(rt->dst.path);
Sorry, that is not correct:
The min() protects the mtu going over np->frag_size (if set). In case we
remove the min we would fallback to dev->mtu or dst_mtu and thus this could
lead to a situation where the first fragment respects frag_size but second
not. This confuses ip6_append_data and would lead to a crash.
I am thinking about changing this to
min(*mtu + rt->dst.header_len, pmtuprobe ? rt->dst.dev->mtu : dst_mtu(rt->dst.path))
or we pass the np directly and test for frag_size again.
Good catch which should be fixed. Thanks!
next prev parent reply other threads:[~2014-03-11 14:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-11 4:31 [PATCH] ipv6: ip6_append_data_mtu do not handle the mtu of the second fragment properly Xin Long
2014-03-11 14:49 ` Hannes Frederic Sowa [this message]
2014-03-12 2:40 ` lucien xin
2014-03-12 10:26 ` Hannes Frederic Sowa
2014-03-13 5:38 ` lucien xin
2014-03-15 15:55 ` Hannes Frederic Sowa
2014-03-16 4:50 ` lucien xin
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=20140311144906.GA29404@order.stressinduktion.org \
--to=hannes@stressinduktion.org \
--cc=gaofeng@cn.fujitsu.com \
--cc=lucien.xin@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).