netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipv6: default route for link local address is not added while assigning a address
@ 2014-01-29  6:41 Sohny Thomas
  2014-01-29 10:38 ` Nicolas Dichtel
  0 siblings, 1 reply; 9+ messages in thread
From: Sohny Thomas @ 2014-01-29  6:41 UTC (permalink / raw)
  To: netdev, linux-kernel, yoshfuji, Nicolas Dichtel, davem, kumuda

Resending this on netdev mailing list:
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

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/net/ipv6?id=62b54dd91567686a1cb118f76a72d5f4764a86dd

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

Signed-off-by: Sohny THomas <sohthoma@linux.vnet.ibm.com>

-----

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index f62c72b..a8a4df9 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -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;
  }

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

end of thread, other threads:[~2014-02-04 18:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-29  6:41 [PATCH] ipv6: default route for link local address is not added while assigning a address Sohny Thomas
2014-01-29 10:38 ` Nicolas Dichtel
2014-01-30 23:29   ` Hannes Frederic Sowa
2014-02-03  7:19     ` Sohny Thomas
2014-02-03 15:23       ` Nicolas Dichtel
2014-02-03 16:08         ` Hannes Frederic Sowa
2014-02-03 16:26           ` Nicolas Dichtel
2014-02-04 18:37             ` sohny thomas
2014-02-03  7:02   ` Sohny Thomas

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).