netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ipv6: set route type for anycast routes
@ 2017-03-16  1:14 David Ahern
  2017-03-17  3:41 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: David Ahern @ 2017-03-16  1:14 UTC (permalink / raw)
  To: netdev; +Cc: David Ahern, Hideaki YOSHIFUJI

Anycast routes have the RTF_ANYCAST flag set, but when dumping routes
for userspace the route type is not set to RTN_ANYCAST. Make it so.

Fixes: 58c4fb86eabcb ("[IPV6]: Flag RTF_ANYCAST for anycast routes")
CC: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
---
 net/ipv6/route.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 35c58b669ebd..9db1418993f2 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -3423,6 +3423,8 @@ static int rt6_fill_node(struct net *net,
 	}
 	else if (rt->rt6i_flags & RTF_LOCAL)
 		rtm->rtm_type = RTN_LOCAL;
+	else if (rt->rt6i_flags & RTF_ANYCAST)
+		rtm->rtm_type = RTN_ANYCAST;
 	else if (rt->dst.dev && (rt->dst.dev->flags & IFF_LOOPBACK))
 		rtm->rtm_type = RTN_LOCAL;
 	else
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: ipv6: set route type for anycast routes
  2017-03-16  1:14 [PATCH] net: ipv6: set route type for anycast routes David Ahern
@ 2017-03-17  3:41 ` David Miller
  2017-03-17  3:45   ` David Ahern
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2017-03-17  3:41 UTC (permalink / raw)
  To: dsa; +Cc: netdev, yoshfuji

From: David Ahern <dsa@cumulusnetworks.com>
Date: Wed, 15 Mar 2017 18:14:33 -0700

> Anycast routes have the RTF_ANYCAST flag set, but when dumping routes
> for userspace the route type is not set to RTN_ANYCAST. Make it so.
> 
> Fixes: 58c4fb86eabcb ("[IPV6]: Flag RTF_ANYCAST for anycast routes")
> CC: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
> Signed-off-by: David Ahern <dsa@cumulusnetworks.com>

Good catch, applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: ipv6: set route type for anycast routes
  2017-03-17  3:41 ` David Miller
@ 2017-03-17  3:45   ` David Ahern
  2017-03-17  3:48     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: David Ahern @ 2017-03-17  3:45 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, yoshfuji

On 3/16/17 9:41 PM, David Miller wrote:
> From: David Ahern <dsa@cumulusnetworks.com>
> Date: Wed, 15 Mar 2017 18:14:33 -0700
> 
>> Anycast routes have the RTF_ANYCAST flag set, but when dumping routes
>> for userspace the route type is not set to RTN_ANYCAST. Make it so.
>>
>> Fixes: 58c4fb86eabcb ("[IPV6]: Flag RTF_ANYCAST for anycast routes")
>> CC: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
>> Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
> 
> Good catch, applied, thanks.

Can you put this into stable for back to say 4.4? that way tools can
directly discriminate anycast routes from host routes for at least
new'ish kernels. Thanks,

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: ipv6: set route type for anycast routes
  2017-03-17  3:45   ` David Ahern
@ 2017-03-17  3:48     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-03-17  3:48 UTC (permalink / raw)
  To: dsa; +Cc: netdev, yoshfuji

From: David Ahern <dsa@cumulusnetworks.com>
Date: Thu, 16 Mar 2017 21:45:12 -0600

> On 3/16/17 9:41 PM, David Miller wrote:
>> From: David Ahern <dsa@cumulusnetworks.com>
>> Date: Wed, 15 Mar 2017 18:14:33 -0700
>> 
>>> Anycast routes have the RTF_ANYCAST flag set, but when dumping routes
>>> for userspace the route type is not set to RTN_ANYCAST. Make it so.
>>>
>>> Fixes: 58c4fb86eabcb ("[IPV6]: Flag RTF_ANYCAST for anycast routes")
>>> CC: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
>>> Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
>> 
>> Good catch, applied, thanks.
> 
> Can you put this into stable for back to say 4.4?

I am only submitting patches for v4.10 and v4.9 -stable.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-17  3:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-16  1:14 [PATCH] net: ipv6: set route type for anycast routes David Ahern
2017-03-17  3:41 ` David Miller
2017-03-17  3:45   ` David Ahern
2017-03-17  3:48     ` 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).