summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2011-09-13 00:09:47 +0000
committerhrs <hrs@FreeBSD.org>2011-09-13 00:09:47 +0000
commit6a7d91769a91f7e4cbe398cc41202ef07e2a0e8a (patch)
treed7987fad882cfcdf1e5947e7685f5a6f5d1df315 /etc
parent08320280c671000afa24235eaab7869ae2dbd736 (diff)
downloadFreeBSD-src-6a7d91769a91f7e4cbe398cc41202ef07e2a0e8a.zip
FreeBSD-src-6a7d91769a91f7e4cbe398cc41202ef07e2a0e8a.tar.gz
- Add an warning when ifconfig_IF_ipv6 has no inet6 keyword in front
of an IPv6 address. (r225489) - Use eval for ${ifconfig_args} to fix an issue fixed in r223506. (r225489) Approved by: re (bz)
Diffstat (limited to 'etc')
-rw-r--r--etc/network.subr12
1 files changed, 10 insertions, 2 deletions
diff --git a/etc/network.subr b/etc/network.subr
index ae3db56..8e9036d 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -126,8 +126,16 @@ ifconfig_up()
# ifconfig_IF_ipv6
ifconfig_args=`ifconfig_getargs $1 ipv6`
if [ -n "${ifconfig_args}" ]; then
+ # backward compatibility: inet6 keyword
+ case "${ifconfig_args}" in
+ :*|[0-9a-fA-F]*:*)
+ warn "\$ifconfig_$1_ipv6 needs " \
+ "\"inet6\" keyword for an IPv6 address."
+ ifconfig_args="inet6 ${ifconfig_args}"
+ ;;
+ esac
ifconfig $1 inet6 -ifdisabled
- ifconfig $1 ${ifconfig_args}
+ eval ifconfig $1 ${ifconfig_args}
_cfg=0
fi
@@ -137,7 +145,7 @@ ifconfig_up()
warn "\$ipv6_ifconfig_$1 is obsolete." \
" Use ifconfig_$1_ipv6 instead."
ifconfig $1 inet6 -ifdisabled
- ifconfig $1 inet6 ${ifconfig_args}
+ eval ifconfig $1 inet6 ${ifconfig_args}
_cfg=0
fi
fi
OpenPOWER on IntegriCloud