summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2013-10-04 04:15:18 +0000
committerhrs <hrs@FreeBSD.org>2013-10-04 04:15:18 +0000
commit1673ef17979a0047f1323bcf933699ee711f0de5 (patch)
treef1461bb8a8b3c3e105f9be8bab669d3473a916cc /etc
parent1315bdcd1cb1cd6133a697efac8e34fd2b7903ab (diff)
downloadFreeBSD-src-1673ef17979a0047f1323bcf933699ee711f0de5.zip
FreeBSD-src-1673ef17979a0047f1323bcf933699ee711f0de5.tar.gz
Do not attempt to do AF-specific configurations on a interface when
noafif() is true. The following warning message was displayed when pflog0 interface existed, for example: ifconfig: ioctl(SIOCGIFINFO_IN6): Protocol family not supported Reported by: bz Approved by: re (gjb)
Diffstat (limited to 'etc')
-rw-r--r--etc/network.subr19
1 files changed, 12 insertions, 7 deletions
diff --git a/etc/network.subr b/etc/network.subr
index cff846a..36e0140 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -48,9 +48,11 @@ ifn_start()
ifscript_up ${ifn} && cfg=0
ifconfig_up ${ifn} && cfg=0
- afexists inet && ipv4_up ${ifn} && cfg=0
- afexists inet6 && ipv6_up ${ifn} && cfg=0
- afexists ipx && ipx_up ${ifn} && cfg=0
+ if ! noafif $ifn; then
+ afexists inet && ipv4_up ${ifn} && cfg=0
+ afexists inet6 && ipv6_up ${ifn} && cfg=0
+ afexists ipx && ipx_up ${ifn} && cfg=0
+ fi
childif_create ${ifn} && cfg=0
return $cfg
@@ -68,9 +70,11 @@ ifn_stop()
[ -z "$ifn" ] && err 1 "ifn_stop called without an interface"
- afexists ipx && ipx_down ${ifn} && cfg=0
- afexists inet6 && ipv6_down ${ifn} && cfg=0
- afexists inet && ipv4_down ${ifn} && cfg=0
+ if ! noafif $ifn; then
+ afexists ipx && ipx_down ${ifn} && cfg=0
+ afexists inet6 && ipv6_down ${ifn} && cfg=0
+ afexists inet && ipv4_down ${ifn} && cfg=0
+ fi
ifconfig_down ${ifn} && cfg=0
ifscript_down ${ifn} && cfg=0
childif_destroy ${ifn} && cfg=0
@@ -103,7 +107,7 @@ ifconfig_up()
fi
# inet6 specific
- if afexists inet6; then
+ if ! noafif $1 && afexists inet6; then
if checkyesno ipv6_activate_all_interfaces; then
_ipv6_opts="-ifdisabled"
elif [ "$1" != "lo0" ]; then
@@ -463,6 +467,7 @@ noafif()
case $_if in
pflog[0-9]*|\
pfsync[0-9]*|\
+ usbus[0-9]*|\
an[0-9]*|\
ath[0-9]*|\
ipw[0-9]*|\
OpenPOWER on IntegriCloud