netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: Harald Welte <laforge@gnumonks.org>
Cc: yoshfuji@linux-ipv6.org, pekkas@netcore.fi, netdev@oss.sgi.com,
	usagi-users@linux-ipv6.org
Subject: Re: 2.6.8.1 IPv6 Routing Problem
Date: Sat, 25 Dec 2004 13:56:50 -0800	[thread overview]
Message-ID: <20041225135650.55dca29f.davem@davemloft.net> (raw)
In-Reply-To: <20041225115415.GI24142@sunbeam.de.gnumonks.org>

On Sat, 25 Dec 2004 12:54:15 +0100
Harald Welte <laforge@gnumonks.org> wrote:

> As far as I can see (please correct me) no such patch was included so
> far, at least with 2.6.10-rc3 I still have the old behaviour.

This specific issue was not resolved, but the issue of loading
the ipv6 module after bringing up your interfaces was fixed
via this patch below.

I've also discussed this with Herbert Xu a bit, and no one
solution is really clear yet.  IPV4 has similar issues, just
in a slightly different form.

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/11/15 14:09:05-08:00 davem@nuts.davemloft.net 
#   [IPV6]: Temp fix for ipv6 link-local address problem.
#   
#   Make sure loopback_dev, if up, has the ipv6 bits
#   for it setup before the addrconf netdev notifier
#   is registered.
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# net/ipv6/addrconf.c
#   2004/11/15 14:08:09-08:00 davem@nuts.davemloft.net +23 -0
#   [IPV6]: Temp fix for ipv6 link-local address problem.
# 
diff -Nru a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
--- a/net/ipv6/addrconf.c	2004-12-25 13:26:13 -08:00
+++ b/net/ipv6/addrconf.c	2004-12-25 13:26:13 -08:00
@@ -3387,6 +3387,29 @@
 
 void __init addrconf_init(void)
 {
+	/* The addrconf netdev notifier requires that loopback_dev
+	 * has it's ipv6 private information allocated and setup
+	 * before it can bring up and give link-local addresses
+	 * to other devices which are up.
+	 *
+	 * Unfortunately, loopback_dev is not necessarily the first
+	 * entry in the global dev_base list of net devices.  In fact,
+	 * it is likely to be the very last entry on that list.
+	 * So this causes the notifier registry below to try and
+	 * give link-local addresses to all devices besides loopback_dev
+	 * first, then loopback_dev, which cases all the non-loopback_dev
+	 * devices to fail to get a link-local address.
+	 *
+	 * So, as a temporary fix, register loopback_dev first by hand.
+	 * Longer term, all of the dependencies ipv6 has upon the loopback
+	 * device and it being up should be removed.
+	 */
+	rtnl_lock();
+	addrconf_notify(&ipv6_dev_notf, NETDEV_REGISTER, &loopback_dev);
+	if (loopback_dev.flags & IFF_UP)
+		addrconf_notify(&ipv6_dev_notf, NETDEV_UP, &loopback_dev);
+	rtnl_unlock();
+
 	register_netdevice_notifier(&ipv6_dev_notf);
 
 #ifdef CONFIG_IPV6_PRIVACY

  reply	other threads:[~2004-12-25 21:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-17 23:08 2.6.8.1 IPv6 Routing Problem Harald Welte
2004-09-17 23:43 ` YOSHIFUJI Hideaki / 吉藤英明
2004-09-18  0:28   ` (usagi-users 03036) " YOSHIFUJI Hideaki / 吉藤英明
2004-09-18 22:02   ` Harald Welte
2004-09-19  1:06     ` David S. Miller
2004-09-19  2:11       ` YOSHIFUJI Hideaki / 吉藤英明
2004-09-19  2:20         ` YOSHIFUJI Hideaki / 吉藤英明
2004-09-19  7:46         ` Harald Welte
2004-09-20  5:08           ` Pekka Savola
2004-09-20  6:20             ` YOSHIFUJI Hideaki / 吉藤英明
2004-09-22  2:57               ` David S. Miller
2004-09-22  3:06                 ` YOSHIFUJI Hideaki / 吉藤英明
2004-12-25 11:54                   ` Harald Welte
2004-12-25 21:56                     ` David S. Miller [this message]
2004-12-26  5:45                       ` Herbert Xu

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=20041225135650.55dca29f.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=laforge@gnumonks.org \
    --cc=netdev@oss.sgi.com \
    --cc=pekkas@netcore.fi \
    --cc=usagi-users@linux-ipv6.org \
    --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).