From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Martin KaFai Lau <kafai@fb.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
Kernel Team <kernel-team@fb.com>
Subject: Re: [RFC PATCH net-next] ipv6: fix ipv6_cow_metrics for non DST_HOST case
Date: Thu, 12 Feb 2015 16:32:39 -0500 [thread overview]
Message-ID: <1423776759.3051.5.camel@stressinduktion.org> (raw)
In-Reply-To: <1423771650-870555-1-git-send-email-kafai@fb.com>
Hi,
On Do, 2015-02-12 at 12:07 -0800, Martin KaFai Lau wrote:
> ipv6_cow_metrics() currently assumes only DST_HOST routes require
> dynamic metrics allocation from inetpeer. The assumption breaks
> when ndisc discovered router with RTAX_MTU and RTAX_HOPLIMIT metric.
> Refer to ndisc_router_discovery() in ndisc.c and note that dst_metric_set()
> is called after the route is created.
>
> This patch creates the metrics array (by calling dst_cow_metrics_generic) in
> ipv6_cow_metrics().
>
> Test:
> radvd.conf:
> interface qemubr0
> {
> AdvLinkMTU 1300;
> AdvCurHopLimit 30;
>
> prefix fd00:face:face:face::/64
> {
> AdvOnLink on;
> AdvAutonomous on;
> AdvRouterAddr off;
> };
> };
>
> Before:
> [root@qemu1 ~]# ip -6 r show | egrep -v unreachable
> fd00:face:face:face::/64 dev eth0 proto kernel metric 256 expires 27sec
> fe80::/64 dev eth0 proto kernel metric 256
> default via fe80::74df:d0ff:fe23:8ef2 dev eth0 proto ra metric 1024 expires 27sec
>
> After:
> [root@qemu1 ~]# ip -6 r show | egrep -v unreachable
> fd00:face:face:face::/64 dev eth0 proto kernel metric 256 expires 27sec mtu 1300
> fe80::/64 dev eth0 proto kernel metric 256 mtu 1300
> default via fe80::74df:d0ff:fe23:8ef2 dev eth0 proto ra metric 1024 expires 27sec mtu 1300 hoplimit 30
>
> Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Looks good to me.
This fixes 8e2ec639173f325 ("ipv6: don't use inetpeer to store metrics
for routes.")?
Thanks,
Hannes
next prev parent reply other threads:[~2015-02-12 21:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-12 20:07 [RFC PATCH net-next] ipv6: fix ipv6_cow_metrics for non DST_HOST case Martin KaFai Lau
2015-02-12 21:32 ` Hannes Frederic Sowa [this message]
2015-02-12 21:39 ` Martin Lau
2015-02-13 0:14 ` [PATCH net-next v2] " Martin KaFai Lau
2015-02-15 4:28 ` 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=1423776759.3051.5.camel@stressinduktion.org \
--to=hannes@stressinduktion.org \
--cc=davem@davemloft.net \
--cc=kafai@fb.com \
--cc=kernel-team@fb.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