From: Eduardo Panisset <eduardo.panisset@gmail.com>
To: hadi@cyberus.ca
Cc: Andrew Morton <akpm@linux-foundation.org>,
Herbert Xu <herbert@gondor.apana.org.au>,
netdev@vger.kernel.org, bugzilla-daemon@bugzilla.kernel.org,
bugme-daemon@bugzilla.kernel.org,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [Bugme-new] [Bug 15682] New: XFRM is not updating RTAX_ADVMSS metric
Date: Tue, 6 Apr 2010 16:02:12 -0300 [thread overview]
Message-ID: <y2jb7b22e81004061202uac6ef8eeodc70d6deb65f7699@mail.gmail.com> (raw)
In-Reply-To: <1270561240.7198.3.camel@bigi>
Hi,
My intention is only to report a problem that I have faced. The
solution proposed isn't (I know that) probably the best one to adopt
as I'm not a kernel specialist, it is more illustrative to allow you
guys understanding what I'm meaning and solve that on the better way
(hence I haven't submited a patch).
Regards,
Eduardo Panisset.
On Tue, Apr 6, 2010 at 10:40 AM, jamal <hadi@cyberus.ca> wrote:
>
> Herbert would give better answers. I dont think what Eduardo is
> doing is correct. You cant just start factoring in tcp headers
> at the xfrm level - and besides, the mtu calculation
> already takes care tunnel headers - so tcp should be able to
> compute correct MSS.
>
> cheers,
> jamal
>
> On Mon, 2010-04-05 at 12:50 -0700, Andrew Morton wrote:
>> (switched to email. Please respond via emailed reply-to-all, not via the
>> bugzilla web interface).
>>
>> On Fri, 2 Apr 2010 17:34:35 GMT
>> bugzilla-daemon@bugzilla.kernel.org wrote:
>>
>> > https://bugzilla.kernel.org/show_bug.cgi?id=15682
>> >
>> > Summary: XFRM is not updating RTAX_ADVMSS metric
>> > Product: Networking
>> > Version: 2.5
>> > Kernel Version: 2.6.28-2
>> > Platform: All
>> > OS/Version: Linux
>> > Tree: Mainline
>> > Status: NEW
>> > Severity: normal
>> > Priority: P1
>> > Component: Other
>> > AssignedTo: acme@ghostprotocols.net
>> > ReportedBy: eduardo.panisset@gmail.com
>> > Regression: No
>> >
>> >
>> > I have been testing DSMIPv6 code which uses all kind of advanced
>> > features of XFRM framework and I believe I have found a bug related to
>> > update RTAX_ADVMSS route metric.
>> > The XFRM code on net/xfrm/xfrm_policy.c by its functions
>> > xfrm_init_pmtu and xfrm_bundle_ok updates RTAX_MTU route caching
>> > metric however I believe it must update RTAX_ADVMSS as this later is
>> > used by tcp connect function for adverting the MSS value on SYN
>> > messages.
>> >
>> > As MSS is not being updated by XFRM the TCP SYN messages (e.g.
>> > originated from a internet browser) is erroneously informing its MSS
>> > (without taking into account the overhead added to IP packet size by
>> > XFRM transformations). One result of that is the browser gets
>> > "frozen" after starts a TCP connection because TCP messages sent by
>> > TCP server will never get to it (TCP server is sending too large
>> > segments to browser).
>> >
>> > Below I describe the changes I have done (on xfrm_init_pmtu and
>> > xfrm_bundle_ok) and that seem to fix this problem:
>> >
>> > xfrm_init_pmtu:
>> > .
>> > .
>> > .
>> >
>> > dst->metrics[RTAX_MTU-1] = pmtu; // original code, below my changes
>> >
>> > if (dst->xfrm->props.mode == XFRM_MODE_TUNNEL)
>> > switch (dst->xfrm->props.family)
>> > {
>> > case AF_INET:
>> > dst->metrics[RTAX_ADVMSS-1] = max_t(unsigned int,
>> > pmtu - sizeof(struct iphdr) - sizeof(struct tcphdr), 256);
>> > break;
>> >
>> > case AF_INET6:
>> > dst->metrics[RTAX_ADVMSS-1] = max_t(unsigned int,
>> > pmtu - sizeof(struct ipv6hdr) - sizeof(struct tcphdr),
>> > dev_net(dst->dev)->ipv6.
>> > sysctl.ip6_rt_min_advmss);
>> > break;
>> > }
>> >
>> > xfrm_bundle_ok:
>> >
>> > .
>> > .
>> > .
>> >
>> > dst->metrics[RTAX_MTU-1] = mtu; // original code, below my changes
>> >
>> > if (dst->xfrm->props.mode == XFRM_MODE_TUNNEL)
>> > switch (dst->xfrm->props.family)
>> > {
>> > case AF_INET:
>> > dst->metrics[RTAX_ADVMSS-1] = max_t(unsigned
>> > int, mtu - sizeof(struct iphdr) - sizeof(struct tcphdr), 256);
>> > break;
>> >
>> > case AF_INET6:
>> > dst->metrics[RTAX_ADVMSS-1] = max_t(unsigned
>> > int, mtu - sizeof(struct ipv6hdr) - sizeof(struct tcphdr),
>> >
>> > dev_net(dst->dev)->ipv6.sysctl.ip6_rt_min_advmss);
>> > break;
>> > }
>> >
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe netdev" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
next prev parent reply other threads:[~2010-04-06 19:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-15682-10286@https.bugzilla.kernel.org/>
2010-04-05 19:50 ` [Bugme-new] [Bug 15682] New: XFRM is not updating RTAX_ADVMSS metric Andrew Morton
2010-04-06 13:40 ` jamal
2010-04-06 19:02 ` Eduardo Panisset [this message]
2010-04-07 12:19 ` jamal
2010-04-07 13:54 ` Herbert Xu
2010-04-07 23:47 ` 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=y2jb7b22e81004061202uac6ef8eeodc70d6deb65f7699@mail.gmail.com \
--to=eduardo.panisset@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=bugzilla-daemon@bugzilla.kernel.org \
--cc=davem@davemloft.net \
--cc=hadi@cyberus.ca \
--cc=herbert@gondor.apana.org.au \
--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).