* [RFC] ipv6: protocol for address routes
@ 2008-08-19 15:54 Stephen Hemminger
2008-08-22 12:19 ` David Miller
2008-08-23 12:17 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Stephen Hemminger @ 2008-08-19 15:54 UTC (permalink / raw)
To: netdev
This fixes a problem spotted with zebra, but not sure if it is necessary a kernel problem.
With IPV6 when an address is added to an interface, Zebra creates a duplicate RIB
entry, one as a connected route, and other as a kernel route.
When an address is added to an interface the RTN_NEWADDR message causes Zebra
to create a connected route. In IPV4 when an address is added to an interface a RTN_NEWROUTE
message is set to user space with the protocol RTPROT_KERNEL. Zebra ignores these messages,
because it already has the connected route.
The problem is that route created in IPV6 has route protocol == RTPROT_BOOT.
Was this a design decision or a bug? This fixes it. Same patch applies to both
net-2.6 and stable.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/net/ipv6/addrconf.c 2008-08-18 21:58:51.000000000 -0700
+++ b/net/ipv6/addrconf.c 2008-08-18 22:00:26.000000000 -0700
@@ -1688,6 +1688,7 @@ addrconf_prefix_route(struct in6_addr *p
.fc_dst_len = plen,
.fc_flags = RTF_UP | flags,
.fc_nlinfo.nl_net = dev_net(dev),
+ .fc_protocol = RTPROT_KERNEL,
};
ipv6_addr_copy(&cfg.fc_dst, pfx);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] ipv6: protocol for address routes
2008-08-19 15:54 [RFC] ipv6: protocol for address routes Stephen Hemminger
@ 2008-08-22 12:19 ` David Miller
2008-08-23 12:17 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2008-08-22 12:19 UTC (permalink / raw)
To: shemminger; +Cc: netdev
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Tue, 19 Aug 2008 08:54:41 -0700
> This fixes a problem spotted with zebra, but not sure if it is necessary a kernel problem.
> With IPV6 when an address is added to an interface, Zebra creates a duplicate RIB
> entry, one as a connected route, and other as a kernel route.
>
> When an address is added to an interface the RTN_NEWADDR message causes Zebra
> to create a connected route. In IPV4 when an address is added to an interface a RTN_NEWROUTE
> message is set to user space with the protocol RTPROT_KERNEL. Zebra ignores these messages,
> because it already has the connected route.
>
> The problem is that route created in IPV6 has route protocol == RTPROT_BOOT.
> Was this a design decision or a bug? This fixes it. Same patch applies to both
> net-2.6 and stable.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
I don't have any strong opinion and it seems correct to me.
Anyone else have any thoughts before I apply this?
> --- a/net/ipv6/addrconf.c 2008-08-18 21:58:51.000000000 -0700
> +++ b/net/ipv6/addrconf.c 2008-08-18 22:00:26.000000000 -0700
> @@ -1688,6 +1688,7 @@ addrconf_prefix_route(struct in6_addr *p
> .fc_dst_len = plen,
> .fc_flags = RTF_UP | flags,
> .fc_nlinfo.nl_net = dev_net(dev),
> + .fc_protocol = RTPROT_KERNEL,
> };
>
> ipv6_addr_copy(&cfg.fc_dst, pfx);
> --
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] ipv6: protocol for address routes
2008-08-19 15:54 [RFC] ipv6: protocol for address routes Stephen Hemminger
2008-08-22 12:19 ` David Miller
@ 2008-08-23 12:17 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2008-08-23 12:17 UTC (permalink / raw)
To: shemminger; +Cc: netdev
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Tue, 19 Aug 2008 08:54:41 -0700
> This fixes a problem spotted with zebra, but not sure if it is
> necessary a kernel problem. With IPV6 when an address is added to
> an interface, Zebra creates a duplicate RIB entry, one as a
> connected route, and other as a kernel route.
>
> When an address is added to an interface the RTN_NEWADDR message
> causes Zebra to create a connected route. In IPV4 when an address is
> added to an interface a RTN_NEWROUTE message is set to user space
> with the protocol RTPROT_KERNEL. Zebra ignores these messages,
> because it already has the connected route.
>
> The problem is that route created in IPV6 has route protocol ==
> RTPROT_BOOT. Was this a design decision or a bug? This fixes
> it. Same patch applies to both net-2.6 and stable.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
I've applied this to net-2.6, thanks Stephen.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-08-23 12:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-19 15:54 [RFC] ipv6: protocol for address routes Stephen Hemminger
2008-08-22 12:19 ` David Miller
2008-08-23 12:17 ` 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).