From: sohny thomas <sohny.kernel@gmail.com>
To: linux-kernel@vger.kernel.org, yoshfuji@linux-ipv6.org,
nicolas.dichtel@6wind.com, davem@davemloft.net,
kumuda <kumuda@linux.vnet.ibm.com>
Subject: ipv6: default route for link local address is not added while assigning a address
Date: Fri, 10 Jan 2014 17:50:36 +0530 [thread overview]
Message-ID: <52CFE594.8010808@gmail.com> (raw)
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;
}
next reply other threads:[~2014-01-10 12:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-10 12:20 sohny thomas [this message]
2014-01-10 16:33 ` ipv6: default route for link local address is not added while assigning a address Nicolas Dichtel
2014-01-10 17:16 ` Hannes Frederic Sowa
[not found] <52D2F201.1090903@gmail.com>
2014-01-13 8:49 ` sohny thomas
2014-01-17 8:34 ` sohny thomas
2014-01-17 12:16 ` Hannes Frederic Sowa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52CFE594.8010808@gmail.com \
--to=sohny.kernel@gmail.com \
--cc=davem@davemloft.net \
--cc=kumuda@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox