* [PATCH net-next] net: ipv6: Set protocol to kernel for local routes
@ 2017-02-02 16:52 David Ahern
2017-02-03 21:01 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: David Ahern @ 2017-02-02 16:52 UTC (permalink / raw)
To: netdev; +Cc: David Ahern
IPv6 stack does not set the protocol for local routes, so those routes show
up with proto "none":
$ ip -6 ro ls table local
local ::1 dev lo proto none metric 0 pref medium
local 2100:3:: dev lo proto none metric 0 pref medium
local 2100:3::4 dev lo proto none metric 0 pref medium
local fe80:: dev lo proto none metric 0 pref medium
...
Set rt6i_protocol to RTPROT_KERNEL for consistency with IPv4. Now routes
show up with proto "kernel":
$ ip -6 ro ls table local
local ::1 dev lo proto kernel metric 0 pref medium
local 2100:3:: dev lo proto kernel metric 0 pref medium
local 2100:3::4 dev lo proto kernel metric 0 pref medium
local fe80:: dev lo proto kernel metric 0 pref medium
...
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
---
net/ipv6/route.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 2563331b0532..91eb3f7782dd 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2634,6 +2634,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
rt->dst.output = ip6_output;
rt->rt6i_idev = idev;
+ rt->rt6i_protocol = RTPROT_KERNEL;
rt->rt6i_flags = RTF_UP | RTF_NONEXTHOP;
if (anycast)
rt->rt6i_flags |= RTF_ANYCAST;
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: ipv6: Set protocol to kernel for local routes
2017-02-02 16:52 [PATCH net-next] net: ipv6: Set protocol to kernel for local routes David Ahern
@ 2017-02-03 21:01 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-02-03 21:01 UTC (permalink / raw)
To: dsa; +Cc: netdev
From: David Ahern <dsa@cumulusnetworks.com>
Date: Thu, 2 Feb 2017 08:52:21 -0800
> IPv6 stack does not set the protocol for local routes, so those routes show
> up with proto "none":
> $ ip -6 ro ls table local
> local ::1 dev lo proto none metric 0 pref medium
> local 2100:3:: dev lo proto none metric 0 pref medium
> local 2100:3::4 dev lo proto none metric 0 pref medium
> local fe80:: dev lo proto none metric 0 pref medium
> ...
>
> Set rt6i_protocol to RTPROT_KERNEL for consistency with IPv4. Now routes
> show up with proto "kernel":
> $ ip -6 ro ls table local
> local ::1 dev lo proto kernel metric 0 pref medium
> local 2100:3:: dev lo proto kernel metric 0 pref medium
> local 2100:3::4 dev lo proto kernel metric 0 pref medium
> local fe80:: dev lo proto kernel metric 0 pref medium
> ...
>
> Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-03 21:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-02 16:52 [PATCH net-next] net: ipv6: Set protocol to kernel for local routes David Ahern
2017-02-03 21:01 ` David Miller
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).