ipv6: default route for link local address is not added while assigning a address
Subsystems (3)
Default route for link local address is configured automatically if NETWORKING_IPV6=yes is in ifcfg-eth*.
When the route table for the interface is flushed and a new address is added to the same device with out removing linklocal addr, default route for link local address has to added by default.
I have found the issue to be caused by this checkin
According to this change :
He removes adding a link local route if any other address is added , applicable across all interfaces though there's mentioned only lo interface So below patch fixes for other devices
-----
net/ipv6/addrconf.c +13 -1
@@ -1763,6 +1763,16 @@ static int addrconf_ifid_infiniband(u8 *eui, struct net_device *dev)return 0 ; } +static void addrconf_add_lroute (struct net_device *dev) +{ +struct in6_addr addr; + +ipv6_addr_set (&addr,htonl (0xFE800000 ),0 ,0 ,0 ); +addrconf_prefix_route (&addr,64 , dev,0 ,0 ); +} + + +static int __ipv6_isatap_ifid (u8 *eui,__be32 addr) {if (addr ==0 )
@@ -2010,8 +2020,10 @@ static struct inet6_dev *addrconf_add_dev(struct net_device *dev)return ERR_PTR (-EACCES );/* Add default multicast route */ -if (!(dev->flags &IFF_LOOPBACK )) +if (!(dev->flags &IFF_LOOPBACK )){addrconf_add_mroute (dev); +addrconf_add_lroute (dev); + }return idev; }
Quoted 5 lines · sohny thomas
Default route for link local address is configured automatically if NETWORKING_IPV6=yes is in ifcfg-eth*.
When the route table for the interface is flushed and a new address is added to the same device with out removing linklocal addr, default route for link local address has to added by default.
I would say that removing the link local route but not the link local address is a configuration problem.
If you remove a connected route but not the associated address, you will have the same problem.
Quoted 10 lines
I have found the issue to be caused by this checkin
According to this change :
He removes adding a link local route if any other address is added , applicable across all interfaces though there's mentioned only lo interface So below patch fixes for other devices
Quoted 10 lines · Nicolas Dichtel
CC netdevQuoted 7 lines · sohny thomas
Default route for link local address is configured automatically if NETWORKING_IPV6=yes is in ifcfg-eth*.
When the route table for the interface is flushed and a new address is added to
the same device with out removing linklocal addr, default route for link local
address has to added by default.
Quoted 6 lines
I would say that removing the link local route but not the link local address
is a configuration problem.
If you remove a connected route but not the associated address, you will have
the same problem.
We have some user accessible routes that are essential for IPv6 stack to work at all. So I don't know if I can agree with that.
Maybe flush is a bit too aggressive?