* 2.6.8.1 IPv6 Routing Problem
@ 2004-09-17 23:08 Harald Welte
2004-09-17 23:43 ` YOSHIFUJI Hideaki / 吉藤英明
0 siblings, 1 reply; 15+ messages in thread
From: Harald Welte @ 2004-09-17 23:08 UTC (permalink / raw)
To: netdev; +Cc: usagi-users
[-- Attachment #1: Type: text/plain, Size: 4628 bytes --]
Hi!
I'm experiencing some strange problems on a 2.6.8.1 vanilla kernel. I
tried to reproduce it with a minimal system:
1) address configuration (just loopback, link-local and one global)
/proc/sys/net/ipv6/conf # ip -6 addr show
1: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qlen 1000
inet6 3ffe:400:900:3001::2/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::20d:b9ff:fe00:a88/64 scope link
valid_lft forever preferred_lft forever
3: lo: <LOOPBACK,UP> mtu 16436
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2) routing table:
/proc/sys/net/ipv6/conf # ip -6 route show
3ffe:400:900:3001::/64 dev eth0 metric 256
fe80::/64 dev eth0 metric 256
ff00::/8 dev eth0 metric 256
default dev eth0 metric 256
unreachable default dev lo metric -1 error -101
3) ping to localhost:
(intermixed with a 'ip6tables -A OUTPUT -j LOG' and '-A INPUT -j LOG'
rules for diagnostics).
/proc/sys/net/ipv6/conf # ping6 ::1
PING ::1 (::1): ou IN= OUT=lo 56 data bytes
SRC=0000:0000:0000:0000:0000:0000:0000:0001 DST=0000:0000:0000:0000:0000:0000:0000:0001 LEN=104 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=ICMPv6 TYPE=128 CODE=0 ID=27911 SEQ=0
in IN=lo OUT= MAC=00:00:00:00:00:00:00:00:00:00:00:00:86:dd SRC=0000:0000:0000:0000:0000:0000:0000:0001 DST=0000:0000:0000:0000:0000:0000:0000:0001 LEN=104 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=ICMPv6 TYPE=128 CODE=0 ID=27911 SEQ=0
ou IN= OUT=lo SRC=0000:0000:0000:0000:0000:0000:0000:0001 DST=0000:0000:0000:0000:0000:0000:0000:0001 LEN=104 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=ICMPv6 TYPE=129 CODE=0 ID=27911 SEQ=0
in IN=lo OUT= MAC=00:00:00:00:00:00:00:00:00:00:00:00:86:dd SRC=0000:0000:0000:0000:0000:0000:0000:0001 DST=0000:0000:0000:0000:0000:0000:0000:0001 LEN=104 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=ICMPv6 TYPE=129 CODE=0 ID=27911 SEQ=0
64 bytes from ::1: icmp6_seq=0 ttl=64 time=246.2 ms
4) ping to global address
/proc/sys/net/ipv6/conf # ping6 3ffe:400:900:3001::2
PING 3ffe:400:90ou IN= OUT=eth0 0:3001::2 (3ffe:SRC=3ffe:0400:0900:3001:0000:0000:0000:0002 400:900:3001::2)DST=3ffe:0400:0900:3001:0000:0000:0000:0002 : 56 datLEN=104 TC=0 HOPLIMIT=64 FLOWLBL=0
PROTO=ICMPv6 TYPE=128 CODE=0 ID=28167 SEQ=0
ou IN= OUT=eth0 SRC=3ffe:0400:0900:3001:0000:0000:0000:0002 DST=ff02:0000:0000:0000:0000:0001:ff00:0002 LEN=72 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=135 CODE=0
ou IN= OUT=eth0 SRC=3ffe:0400:0900:3001:0000:0000:0000:0002 DST=ff02:0000:0000:0000:0000:0001:ff00:0002 LEN=72 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=135 CODE=0
ou IN= OUT=eth0 SRC=3ffe:0400:0900:3001:0000:0000:0000:0002 DST=3ffe:0400:0900:3001:0000:0000:0000:0002 LEN=104 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=ICMPv6 TYPE=128 CODE=0 ID=28167 SEQ=256
ou IN= OUT=eth0 SRC=3ffe:0400:0900:3001:0000:0000:0000:0002 DST=ff02:0000:0000:0000:0000:0001:ff00:0002 LEN=72 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=135 CODE=0
ou IN= OUT=eth0 SRC=3ffe:0400:0900:3001:0000:0000:0000:0002 DST=3ffe:0400:0900:3001:0000:0000:0000:0002 LEN=104 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=ICMPv6 TYPE=128 CODE=0 ID=28167 SEQ=512
ou IN= OUT=eth0 SRC=3ffe:0400:0900:3001:0000:0000:0000:0002 DST=3ffe:0400:0900:3001:0000:0000:0000:0002 LEN=152 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=ICMPv6 TYPE=1 CODE=3 [SRC=3ffe:0400:0900:3001:0000:0000:0000:0002 DST=3ffe:0400:0900:3001:0000:0000:0000:0002 LEN=104 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=ICMPv6 TYPE=128 CODE=0 ID=28167 SEQ=0 ]
ou IN= OUT=eth0 SRC=3ffe:0400:0900:3001:0000:0000:0000:0002 DST=ff02:0000:0000:0000:0000:0001:ff00:0002 LEN=72 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=135 CODE=0
ou IN= OUT=eth0 SRC=3ffe:0400:0900:3001:0000:0000:0000:0002 DST=3ffe:0400:0900:3001:0000:0000:0000:0002 LEN=104 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=ICMPv6 TYPE=128 CODE=0 ID=28167 SEQ=768
--- 3ffe:400:900:3001::2 ping statistics ---
4 packets transmitted, 0 packets received, 100% packet loss
Apparently the node tries to do neighbour solicitation on itself, and
then even sends an ICMPv6 destination unreachable to itself, all over
the ethernet device ?!?
Can anybody please explain what's going on?
Thanks!
--
- Harald Welte <laforge@netfilter.org> http://www.netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2.6.8.1 IPv6 Routing Problem
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
0 siblings, 2 replies; 15+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-09-17 23:43 UTC (permalink / raw)
To: laforge; +Cc: netdev, usagi-users, yoshfuji
In article <20040917230803.GJ2678@sunbeam.de.gnumonks.org> (at Sat, 18 Sep 2004 01:08:03 +0200), Harald Welte <laforge@netfilter.org> says:
> I'm experiencing some strange problems on a 2.6.8.1 vanilla kernel. I
> tried to reproduce it with a minimal system:
:
> (intermixed with a 'ip6tables -A OUTPUT -j LOG' and '-A INPUT -j LOG'
> rules for diagnostics).
It is not minimum with ip6tables. :-)
Anyway, please try the latest bk tree.
There are may fixes in it.
Thanks.
--yoshfuji
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: (usagi-users 03036) Re: 2.6.8.1 IPv6 Routing Problem
2004-09-17 23:43 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2004-09-18 0:28 ` YOSHIFUJI Hideaki / 吉藤英明
2004-09-18 22:02 ` Harald Welte
1 sibling, 0 replies; 15+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-09-18 0:28 UTC (permalink / raw)
To: laforge; +Cc: netdev, usagi-users, yoshfuji
oops, sorry for the typo.
In article <20040918.084304.75142669.yoshfuji@linux-ipv6.org> (at Sat, 18 Sep 2004 08:43:04 +0900 (JST)), YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> says:
> > I'm experiencing some strange problems on a 2.6.8.1 vanilla kernel. I
> > tried to reproduce it with a minimal system:
> :
> Anyway, please try the latest bk tree.
> There are may fixes in it.
many
--yoshfuji
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2.6.8.1 IPv6 Routing Problem
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
1 sibling, 1 reply; 15+ messages in thread
From: Harald Welte @ 2004-09-18 22:02 UTC (permalink / raw)
To: YOSHIFUJI Hideaki / ?$B5HF#1QL@; +Cc: netdev, usagi-users
[-- Attachment #1: Type: text/plain, Size: 2379 bytes --]
On Sat, Sep 18, 2004 at 08:43:04AM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:
> > I'm experiencing some strange problems on a 2.6.8.1 vanilla kernel. I
> > tried to reproduce it with a minimal system:
> :
> > (intermixed with a 'ip6tables -A OUTPUT -j LOG' and '-A INPUT -j LOG'
> > rules for diagnostics).
>
> It is not minimum with ip6tables. :-)
i just added ip6tables to get some log messages on incoming/outgoing
packets (small embedded system with no tcpdump).
> Anyway, please try the latest bk tree.
> There are may fixes in it.
In fact the problem disappeared with 2.6.9-rc2. I thought the idea of
2.6.8.x is to have real show-stopper bugfixes go into that series... and
if something like this is severely broken in ipv6, I would say it
rectifies a 2.6.8.2 release, don't you think?
I have to admit that this is the first time that my linux ipv6 setup
breaks within four years...
Now I'm stuck with another issue: The interfaces suddenly no logner
get any link-local addresses:
/proc/net # ip -6 addr
2: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qlen 1000
inet6 3ffe:400:900:1100::1/64 scope global
valid_lft forever preferred_lft forever
inet6 3ffe:400:900:1100:207:e9ff:fe09:b920/64 scope global
valid_lft forever preferred_lft forever
3: lo: <LOOPBACK,UP> mtu 16436
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
4: eth0.2: <BROADCAST,MULTICAST,UP> mtu 1500
inet6 3ffe:400:900:1101::1/64 scope global
valid_lft forever preferred_lft forever
inet6 3ffe:400:900:1101:207:e9ff:fe09:b920/64 scope global
valid_lft forever preferred_lft forever
5: eth0.3: <BROADCAST,MULTICAST,UP> mtu 1500
inet6 3ffe:400:900:9999::1/64 scope global
valid_lft forever preferred_lft forever
inet6 3ffe:400:900:9999:207:e9ff:fe09:b920/64 scope global
valid_lft forever preferred_lft forever
8: tap0: <BROADCAST,MULTICAST,UP> mtu 1399 qlen 1000
inet6 3ffe:400:900:3001::2/64 scope global
valid_lft forever preferred_lft forever
/proc/net # uname -r
2.6.9-rc2
Thanks!
--
- Harald Welte <laforge@gnumonks.org> http://www.gnumonks.org/
============================================================================
Programming is like sex: One mistake and you have to support it your lifetime
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2.6.8.1 IPv6 Routing Problem
2004-09-18 22:02 ` Harald Welte
@ 2004-09-19 1:06 ` David S. Miller
2004-09-19 2:11 ` YOSHIFUJI Hideaki / 吉藤英明
0 siblings, 1 reply; 15+ messages in thread
From: David S. Miller @ 2004-09-19 1:06 UTC (permalink / raw)
To: Harald Welte; +Cc: yoshfuji, netdev, usagi-users
On Sun, 19 Sep 2004 00:02:11 +0200
Harald Welte <laforge@gnumonks.org> wrote:
> Now I'm stuck with another issue: The interfaces suddenly no logner
> get any link-local addresses:
Probably due to this change.
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/09/10 14:50:26-07:00 yoshfuji@linux-ipv6.org
# [IPV6]: Deprecate all-on-link assumption
#
# If we don't have IPv6 default routes, we assume all ipv6 destinations
# are on-link as specified in RFC2461. It, however, is considered harmful now;
# it is problematic with IPv6-capable nodes that do not have off-link
# IPv6 connectivity (eg no default routers) and such nodes will take
# a few seconds until they fall back to use IPv4.
#
# See <draft-ietf-v6ops-onlinkassumption-02.txt> for details.
#
# From: KUNITAKE Koichi <kunitake@anchor.jp>
# Signed-off-by: KUNITAKE Koichi <kunitake@anchor.jp>
# Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
# Signed-off-by: David S. Miller <davem@davemloft.net>
#
# net/ipv6/addrconf.c
# 2004/09/10 14:50:09-07:00 yoshfuji@linux-ipv6.org +4 -12
# [IPV6]: Deprecate all-on-link assumption
#
# If we don't have IPv6 default routes, we assume all ipv6 destinations
# are on-link as specified in RFC2461. It, however, is considered harmful now;
# it is problematic with IPv6-capable nodes that do not have off-link
# IPv6 connectivity (eg no default routers) and such nodes will take
# a few seconds until they fall back to use IPv4.
#
# See <draft-ietf-v6ops-onlinkassumption-02.txt> for details.
#
# From: KUNITAKE Koichi <kunitake@anchor.jp>
# Signed-off-by: KUNITAKE Koichi <kunitake@anchor.jp>
# Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
# Signed-off-by: David S. Miller <davem@davemloft.net>
#
diff -Nru a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
--- a/net/ipv6/addrconf.c 2004-09-18 17:50:32 -07:00
+++ b/net/ipv6/addrconf.c 2004-09-18 17:50:32 -07:00
@@ -2108,21 +2108,13 @@
ndisc_send_rs(ifp->idev->dev, &ifp->addr, &all_routers);
} else {
- struct in6_rtmsg rtmsg;
-
spin_unlock(&ifp->lock);
-
+ /*
+ * Note: we do not support deprecated "all on-link"
+ * assumption any longer.
+ */
printk(KERN_DEBUG "%s: no IPv6 routers present\n",
ifp->idev->dev->name);
-
- memset(&rtmsg, 0, sizeof(struct in6_rtmsg));
- rtmsg.rtmsg_type = RTMSG_NEWROUTE;
- rtmsg.rtmsg_metric = IP6_RT_PRIO_ADDRCONF;
- rtmsg.rtmsg_flags = (RTF_ALLONLINK | RTF_DEFAULT | RTF_UP);
-
- rtmsg.rtmsg_ifindex = ifp->idev->dev->ifindex;
-
- ip6_route_add(&rtmsg, NULL, NULL);
}
out:
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2.6.8.1 IPv6 Routing Problem
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
0 siblings, 2 replies; 15+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-09-19 2:11 UTC (permalink / raw)
To: davem; +Cc: laforge, netdev, usagi-users, yoshfuji
In article <20040918180647.6be57884.davem@davemloft.net> (at Sat, 18 Sep 2004 18:06:47 -0700), "David S. Miller" <davem@davemloft.net> says:
> On Sun, 19 Sep 2004 00:02:11 +0200
> Harald Welte <laforge@gnumonks.org> wrote:
>
> > Now I'm stuck with another issue: The interfaces suddenly no logner
> > get any link-local addresses:
>
> Probably due to this change.
>
> # This is a BitKeeper generated diff -Nru style patch.
> #
> # ChangeSet
> # 2004/09/10 14:50:26-07:00 yoshfuji@linux-ipv6.org
> # [IPV6]: Deprecate all-on-link assumption
I don't think so.
I've run TAHI test on post-rc2 kernel,
and the result is as I expected.
I haven't met such issues... hmm...
--yoshfuji
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2.6.8.1 IPv6 Routing Problem
2004-09-19 2:11 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2004-09-19 2:20 ` YOSHIFUJI Hideaki / 吉藤英明
2004-09-19 7:46 ` Harald Welte
1 sibling, 0 replies; 15+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-09-19 2:20 UTC (permalink / raw)
To: davem; +Cc: laforge, netdev, usagi-users, yoshfuji
In article <20040919.111141.42341294.yoshfuji@linux-ipv6.org> (at Sun, 19 Sep 2004 11:11:41 +0900 (JST)), YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> says:
> In article <20040918180647.6be57884.davem@davemloft.net> (at Sat, 18 Sep 2004 18:06:47 -0700), "David S. Miller" <davem@davemloft.net> says:
>
> > On Sun, 19 Sep 2004 00:02:11 +0200
> > Harald Welte <laforge@gnumonks.org> wrote:
> >
> > > Now I'm stuck with another issue: The interfaces suddenly no logner
> > > get any link-local addresses:
> >
> > Probably due to this change.
> >
> > # This is a BitKeeper generated diff -Nru style patch.
> > #
> > # ChangeSet
> > # 2004/09/10 14:50:26-07:00 yoshfuji@linux-ipv6.org
> > # [IPV6]: Deprecate all-on-link assumption
>
> I don't think so.
And, that code was run after the link-local address assignment.
What we did was:
1. Try to assign link-local address.
- start DAD
- wait a while
2. If DAD ends with no duplicated addresses,
try to search neighbor routers.
- send RS
- wait a while
3. If no routers present, add "all-on-link" route.
The patch deletes the last one (3).
and it should not be something to do with the link-local address assignment.
--yoshfuji
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2.6.8.1 IPv6 Routing Problem
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
1 sibling, 1 reply; 15+ messages in thread
From: Harald Welte @ 2004-09-19 7:46 UTC (permalink / raw)
To: YOSHIFUJI Hideaki / ?$B5HF#1QL@; +Cc: davem, netdev, usagi-users
[-- Attachment #1: Type: text/plain, Size: 982 bytes --]
On Sun, Sep 19, 2004 at 11:11:41AM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:
> > On Sun, 19 Sep 2004 00:02:11 +0200
> > Harald Welte <laforge@gnumonks.org> wrote:
> >
> > > Now I'm stuck with another issue: The interfaces suddenly no logner
> > > get any link-local addresses:
> I've run TAHI test on post-rc2 kernel,
> and the result is as I expected.
> I haven't met such issues... hmm...
Apparently this happens when you
1) insmod ipv6
2) ifconfig your interfaces up
3) only now ifconfig 'lo' up.
This happened due to a typo in my script :( If 'lo' exists prior to the
other interfaces, everything seems to work as usual.
Is this desired or accidential and/or documented behaviour?
> --yoshfuji
--
- Harald Welte <laforge@gnumonks.org> http://www.gnumonks.org/
============================================================================
Programming is like sex: One mistake and you have to support it your lifetime
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2.6.8.1 IPv6 Routing Problem
2004-09-19 7:46 ` Harald Welte
@ 2004-09-20 5:08 ` Pekka Savola
2004-09-20 6:20 ` YOSHIFUJI Hideaki / 吉藤英明
0 siblings, 1 reply; 15+ messages in thread
From: Pekka Savola @ 2004-09-20 5:08 UTC (permalink / raw)
To: Harald Welte; +Cc: YOSHIFUJI Hideaki / ?$B5HF#1QL@, davem, netdev, usagi-users
On Sun, 19 Sep 2004, Harald Welte wrote:
> Apparently this happens when you
>
> 1) insmod ipv6
> 2) ifconfig your interfaces up
> 3) only now ifconfig 'lo' up.
>
> This happened due to a typo in my script :( If 'lo' exists prior to the
> other interfaces, everything seems to work as usual.
>
> Is this desired or accidential and/or documented behaviour?
AFAIK, it's not documented, but known among developers (in general):
there's a lot of magic tied to the loopback interface, and lots of
things (like ND) break very badly if it's not always up and running
appropriately..
This has bitten people so many times that it might be useful to try to
mitigate the problem somehow, if feasible...
--
Pekka Savola "You each name yourselves king, yet the
Netcore Oy kingdom bleeds."
Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2.6.8.1 IPv6 Routing Problem
2004-09-20 5:08 ` Pekka Savola
@ 2004-09-20 6:20 ` YOSHIFUJI Hideaki / 吉藤英明
2004-09-22 2:57 ` David S. Miller
0 siblings, 1 reply; 15+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-09-20 6:20 UTC (permalink / raw)
To: pekkas, davem; +Cc: laforge, davem, netdev, usagi-users, yoshfuji
In article <Pine.LNX.4.44.0409200806460.22679-100000@netcore.fi> (at Mon, 20 Sep 2004 08:08:36 +0300 (EEST)), Pekka Savola <pekkas@netcore.fi> says:
> On Sun, 19 Sep 2004, Harald Welte wrote:
> > Apparently this happens when you
> >
> > 1) insmod ipv6
> > 2) ifconfig your interfaces up
> > 3) only now ifconfig 'lo' up.
> >
> > This happened due to a typo in my script :( If 'lo' exists prior to the
> > other interfaces, everything seems to work as usual.
> >
> > Is this desired or accidential and/or documented behaviour?
>
> AFAIK, it's not documented, but known among developers (in general):
> there's a lot of magic tied to the loopback interface, and lots of
> things (like ND) break very badly if it's not always up and running
> appropriately..
I agree that it is not documented.
This behavior lives for years (AFAIK),
and we haven't got so many reports
because people usually bring loopback device first.
I think the following message will help people, anyway.
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
===== net/ipv6/route.c 1.94 vs edited =====
--- 1.94/net/ipv6/route.c 2004-09-15 06:03:30 +09:00
+++ edited/net/ipv6/route.c 2004-09-20 14:59:08 +09:00
@@ -1373,6 +1373,12 @@
if (rt == NULL)
return ERR_PTR(-ENOMEM);
+ if (!(loopback_dev.flags & IFF_UP)) {
+ printk(KERN_WARNING "INET6: please bring loopback device up"
+ "first.\n");
+ return ERR_PTR(-ENETDOWN);
+ }
+
dev_hold(&loopback_dev);
in6_dev_hold(idev);
--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2.6.8.1 IPv6 Routing Problem
2004-09-20 6:20 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2004-09-22 2:57 ` David S. Miller
2004-09-22 3:06 ` YOSHIFUJI Hideaki / 吉藤英明
0 siblings, 1 reply; 15+ messages in thread
From: David S. Miller @ 2004-09-22 2:57 UTC (permalink / raw)
To: yoshfuji; +Cc: pekkas, laforge, netdev, usagi-users
On Mon, 20 Sep 2004 15:20:12 +0900 (JST)
YOSHIFUJI Hideaki / ^[$B5HF#1QL@^[(B <yoshfuji@linux-ipv6.org> wrote:
> This behavior lives for years (AFAIK),
> and we haven't got so many reports
> because people usually bring loopback device first.
>
> I think the following message will help people, anyway.
If ipv6 has a dependency upon this, why doesn't it just
bring the device up itself at this moment if necessary?
It is kind of silly to force this device up ordering
upon people anyways.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2.6.8.1 IPv6 Routing Problem
2004-09-22 2:57 ` David S. Miller
@ 2004-09-22 3:06 ` YOSHIFUJI Hideaki / 吉藤英明
2004-12-25 11:54 ` Harald Welte
0 siblings, 1 reply; 15+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-09-22 3:06 UTC (permalink / raw)
To: davem; +Cc: pekkas, laforge, netdev, usagi-users, yoshfuji
In article <20040921195752.015e3d1d.davem@davemloft.net> (at Tue, 21 Sep 2004 19:57:52 -0700), "David S. Miller" <davem@davemloft.net> says:
> On Mon, 20 Sep 2004 15:20:12 +0900 (JST)
> YOSHIFUJI Hideaki / ^[$B5HF#1QL@^[(B <yoshfuji@linux-ipv6.org> wrote:
>
> > This behavior lives for years (AFAIK),
> > and we haven't got so many reports
> > because people usually bring loopback device first.
> >
> > I think the following message will help people, anyway.
>
> If ipv6 has a dependency upon this, why doesn't it just
> bring the device up itself at this moment if necessary?
Okay, I'll make a patch for this.
--yoshfuji
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2.6.8.1 IPv6 Routing Problem
2004-09-22 3:06 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2004-12-25 11:54 ` Harald Welte
2004-12-25 21:56 ` David S. Miller
0 siblings, 1 reply; 15+ messages in thread
From: Harald Welte @ 2004-12-25 11:54 UTC (permalink / raw)
To: YOSHIFUJI Hideaki / ?$B5HF#1QL@; +Cc: davem, pekkas, netdev, usagi-users
[-- Attachment #1: Type: text/plain, Size: 1268 bytes --]
Getting back to an ooooold thread...
On Wed, Sep 22, 2004 at 12:06:30PM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:
> In article <20040921195752.015e3d1d.davem@davemloft.net> (at Tue, 21 Sep 2004 19:57:52 -0700), "David S. Miller" <davem@davemloft.net> says:
>
> > On Mon, 20 Sep 2004 15:20:12 +0900 (JST)
> > YOSHIFUJI Hideaki / ^[$B5HF#1QL@^[(B <yoshfuji@linux-ipv6.org> wrote:
> >
> > > This behavior lives for years (AFAIK),
> > > and we haven't got so many reports
> > > because people usually bring loopback device first.
> > >
> > > I think the following message will help people, anyway.
> >
> > If ipv6 has a dependency upon this, why doesn't it just
> > bring the device up itself at this moment if necessary?
>
> Okay, I'll make a patch for this.
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.
Could you please include the proposed printk-warning-patch until the
issue gets resolved?
Thanks!
--
- Harald Welte <laforge@gnumonks.org> http://www.gnumonks.org/
============================================================================
Programming is like sex: One mistake and you have to support it your lifetime
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2.6.8.1 IPv6 Routing Problem
2004-12-25 11:54 ` Harald Welte
@ 2004-12-25 21:56 ` David S. Miller
2004-12-26 5:45 ` Herbert Xu
0 siblings, 1 reply; 15+ messages in thread
From: David S. Miller @ 2004-12-25 21:56 UTC (permalink / raw)
To: Harald Welte; +Cc: yoshfuji, pekkas, netdev, usagi-users
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
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2.6.8.1 IPv6 Routing Problem
2004-12-25 21:56 ` David S. Miller
@ 2004-12-26 5:45 ` Herbert Xu
0 siblings, 0 replies; 15+ messages in thread
From: Herbert Xu @ 2004-12-26 5:45 UTC (permalink / raw)
To: David S. Miller; +Cc: laforge, yoshfuji, pekkas, netdev, usagi-users
David S. Miller <davem@davemloft.net> wrote:
>
> 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.
Well I still reckon that the IPv4 behaviour is just fine as
it is. In fact if anything we should make the IPv6 case as
similar to Ipv4 as possible.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2004-12-26 5:45 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2004-12-26 5:45 ` Herbert Xu
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).