aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2006-09-21 01:44:52 +0000
committerBrooks Davis <brooks@FreeBSD.org>2006-09-21 01:44:52 +0000
commit6da9aa145225b9ae6b303b9c0fe1da3d501dfc14 (patch)
treee6c24f6b0461195db15c79c0c87893254451b78e /etc
parent53d588be856e310f2f88c1b35bcdb74e1180b9fb (diff)
Notes
Diffstat (limited to 'etc')
-rw-r--r--etc/network.subr24
-rwxr-xr-xetc/pccard_ether6
2 files changed, 29 insertions, 1 deletions
diff --git a/etc/network.subr b/etc/network.subr
index cb00fbd10937..de2aaf4fda2d 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -237,6 +237,30 @@ wpaif()
return 1
}
+# ipv6if if
+# Returns 0 if the interface should be configured for IPv6 and
+# 1 otherwise.
+ipv6if()
+{
+ if ! checkyesno ipv6_enable; then
+ return 1
+ fi
+ case "${ipv6_network_interfaces}" in
+ [Aa][Uu][Tt][Oo])
+ return 0
+ ;;
+ ''|[Nn][Oo][Nn][Ee])
+ return 1
+ ;;
+ esac
+ for v6if in ${ipv6_network_interfaces}; do
+ if [ "${v6if}" = "${1}" ]; then
+ return 0
+ fi
+ done
+ return 1
+}
+
# ifexists if
# Returns 0 if the interface exists and 1 otherwise.
ifexists()
diff --git a/etc/pccard_ether b/etc/pccard_ether
index d8128da6a959..4bf9b52fce55 100755
--- a/etc/pccard_ether
+++ b/etc/pccard_ether
@@ -89,7 +89,11 @@ pccard_ether_start()
fi
# IPv6 setup
- if checkyesno ipv6_enable; then
+ if ipv6if $ifn; then
+ # XXX: network6_interface_setup assumes you're calling
+ # it with ALL the IPv6 interfaces at once and thus isn't
+ # really appropraite for this job, but it's the best we've
+ # got for now.
network6_interface_setup $ifn
fi
}