diff options
author | hrs <hrs@FreeBSD.org> | 2006-12-08 06:34:06 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2006-12-08 06:34:06 +0000 |
commit | 5ed0fdbeeab5ecad17058c1294937c7ac45118a7 (patch) | |
tree | 8b545f297b64df8a091484c85bfffec540e387b3 | |
parent | c15939c62a6e4e1a876dc97b1af9cf87c85142f9 (diff) | |
download | FreeBSD-src-5ed0fdbeeab5ecad17058c1294937c7ac45118a7.zip FreeBSD-src-5ed0fdbeeab5ecad17058c1294937c7ac45118a7.tar.gz |
Add a link-local address to the lo0 even when ipv6_enable="NO".
A kernel with INET6 always has ::1 on lo0, so in the case of
ipv6_enable="NO" the lo0 can have ::1 with no link-local address.
This is a violation of the IPv6 specification. As a workaround for
this situation, fe80::1 is added in rc.d/auto_linklocal when lo0 has
no link-local address. This should not be harmful for IPv4-only users.
-rw-r--r-- | etc/rc.d/auto_linklocal | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/etc/rc.d/auto_linklocal b/etc/rc.d/auto_linklocal index 7f37290..2382c48 100644 --- a/etc/rc.d/auto_linklocal +++ b/etc/rc.d/auto_linklocal @@ -8,6 +8,7 @@ # BEFORE: sysctl . /etc/rc.subr +. /etc/network.subr name="auto_linklocal" start_cmd="auto_linklocal_start" @@ -17,6 +18,10 @@ auto_linklocal_start() { if ! checkyesno ipv6_enable && ${SYSCTL} net.inet6 > /dev/null 2>&1; then ${SYSCTL_W} net.inet6.ip6.auto_linklocal=0 + laddr=`network6_getladdr lo0` + if [ -z "${laddr}" ]; then + ifconfig lo0 inet6 fe80::1 prefixlen 64 + fi fi } |