summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2006-12-08 06:34:06 +0000
committerhrs <hrs@FreeBSD.org>2006-12-08 06:34:06 +0000
commit5ed0fdbeeab5ecad17058c1294937c7ac45118a7 (patch)
tree8b545f297b64df8a091484c85bfffec540e387b3 /etc
parentc15939c62a6e4e1a876dc97b1af9cf87c85142f9 (diff)
downloadFreeBSD-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.
Diffstat (limited to 'etc')
-rw-r--r--etc/rc.d/auto_linklocal5
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
}
OpenPOWER on IntegriCloud