summaryrefslogtreecommitdiff
path: root/net/ipv6
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-08-23 05:16:46 -0700
committerDavid S. Miller <davem@davemloft.net>2008-08-23 05:16:46 -0700
commitf410a1fba7afa79d2992620e874a343fdba28332 (patch)
tree5e08d30678cfadd65a8dfe20bc12160a23faa43d /net/ipv6
parentfdc0bde90a689b9145f2b6f271c03f4c99d09667 (diff)
downloadlinux-3.10-f410a1fba7afa79d2992620e874a343fdba28332.tar.gz
linux-3.10-f410a1fba7afa79d2992620e874a343fdba28332.tar.bz2
linux-3.10-f410a1fba7afa79d2992620e874a343fdba28332.zip
ipv6: protocol for address routes
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/addrconf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index e2d3b7580b7..7b6a584b62d 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1688,6 +1688,7 @@ addrconf_prefix_route(struct in6_addr *pfx, int plen, struct net_device *dev,
.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);