From: David Miller <davem@davemloft.net>
To: sbrivio@redhat.com
Cc: dsahern@gmail.com, weiwan@google.com, yoshfuji@linux-ipv6.org,
maze@google.com, xmu@redhat.com, netdev@vger.kernel.org
Subject: Re: [PATCH net v2 RESEND] ipv6: Reflect MTU changes on PMTU of exceptions for MTU-less routes
Date: Wed, 07 Mar 2018 13:18:31 -0500 (EST) [thread overview]
Message-ID: <20180307.131831.539680183791122281.davem@davemloft.net> (raw)
In-Reply-To: <20180306101019.74424-1-sbrivio@redhat.com>
From: Stefano Brivio <sbrivio@redhat.com>
Date: Tue, 6 Mar 2018 11:10:19 +0100
> Currently, administrative MTU changes on a given netdevice are
> not reflected on route exceptions for MTU-less routes, with a
> set PMTU value, for that device:
>
> # ip -6 route get 2001:db8::b
> 2001:db8::b from :: dev vti_a proto kernel src 2001:db8::a metric 256 pref medium
> # ping6 -c 1 -q -s10000 2001:db8::b > /dev/null
> # ip netns exec a ip -6 route get 2001:db8::b
> 2001:db8::b from :: dev vti_a src 2001:db8::a metric 0
> cache expires 571sec mtu 4926 pref medium
> # ip link set dev vti_a mtu 3000
> # ip -6 route get 2001:db8::b
> 2001:db8::b from :: dev vti_a src 2001:db8::a metric 0
> cache expires 571sec mtu 4926 pref medium
> # ip link set dev vti_a mtu 9000
> # ip -6 route get 2001:db8::b
> 2001:db8::b from :: dev vti_a src 2001:db8::a metric 0
> cache expires 571sec mtu 4926 pref medium
>
> The first issue is that since commit fb56be83e43d ("net-ipv6: on
> device mtu change do not add mtu to mtu-less routes") we don't
> call rt6_exceptions_update_pmtu() from rt6_mtu_change_route(),
> which handles administrative MTU changes, if the regular route
> is MTU-less.
>
> However, PMTU exceptions should be always updated, as long as
> RTAX_MTU is not locked. Keep the check for MTU-less main route,
> as introduced by that commit, but, for exceptions,
> call rt6_exceptions_update_pmtu() regardless of that check.
>
> Once that is fixed, one problem remains: MTU changes are not
> reflected if the new MTU is higher than the previous one,
> because rt6_exceptions_update_pmtu() doesn't allow that. We
> should instead allow PMTU increase if the old PMTU matches the
> local MTU, as that implies that the old MTU was the lowest in the
> path, and PMTU discovery might lead to different results.
>
> The existing check in rt6_mtu_change_route() correctly took that
> case into account (for regular routes only), so factor it out
> and re-use it also in rt6_exceptions_update_pmtu().
>
> While at it, fix comments style and grammar, and try to be a bit
> more descriptive.
>
> Reported-by: Xiumei Mu <xmu@redhat.com>
> Fixes: fb56be83e43d ("net-ipv6: on device mtu change do not add mtu to mtu-less routes")
> Fixes: f5bbe7ee79c2 ("ipv6: prepare rt6_mtu_change() for exception table")
> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Applied and queued up for -stable, thanks.
prev parent reply other threads:[~2018-03-07 18:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-06 10:10 [PATCH net v2 RESEND] ipv6: Reflect MTU changes on PMTU of exceptions for MTU-less routes Stefano Brivio
2018-03-06 20:30 ` David Ahern
2018-03-06 21:07 ` Stefano Brivio
2018-03-07 4:46 ` David Ahern
2018-03-07 18:18 ` David Miller [this message]
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=20180307.131831.539680183791122281.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=maze@google.com \
--cc=netdev@vger.kernel.org \
--cc=sbrivio@redhat.com \
--cc=weiwan@google.com \
--cc=xmu@redhat.com \
--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).