From: Sohny Thomas <sthomas@linux.vnet.ibm.com>
To: netdev <netdev@vger.kernel.org>,
linux-kernel@vger.kernel.org, yoshfuji@linux-ipv6.org,
Nicolas Dichtel <nicolas.dichtel@6wind.com>,
davem@davemloft.net, kumuda <kumuda@linux.vnet.ibm.com>
Subject: [PATCH] ipv6: default route for link local address is not added while assigning a address
Date: Wed, 29 Jan 2014 12:11:46 +0530 [thread overview]
Message-ID: <52E8A2AA.3090507@linux.vnet.ibm.com> (raw)
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;
}
next reply other threads:[~2014-01-29 6:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-29 6:41 Sohny Thomas [this message]
2014-01-29 10:38 ` [PATCH] ipv6: default route for link local address is not added while assigning a address 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
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=52E8A2AA.3090507@linux.vnet.ibm.com \
--to=sthomas@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=kumuda@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).