From 5ed0fdbeeab5ecad17058c1294937c7ac45118a7 Mon Sep 17 00:00:00 2001 From: hrs Date: Fri, 8 Dec 2006 06:34:06 +0000 Subject: 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. --- etc/rc.d/auto_linklocal | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'etc/rc.d/auto_linklocal') 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 } -- cgit v1.1