Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Sep 2011 20:17:44 +0000 (UTC)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r225489 - user/hrs/ipv6/etc
Message-ID:  <201109112017.p8BKHifo094093@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hrs
Date: Sun Sep 11 20:17:44 2011
New Revision: 225489
URL: http://svn.freebsd.org/changeset/base/225489

Log:
  - Add an warning when ifconfig_IF_ipv6 has no inet6 keyword in front of an IPv6
    address.
  
  - Use eval for ${ifconfig_args} to fix an issue fixed in r223506.

Modified:
  user/hrs/ipv6/etc/network.subr

Modified: user/hrs/ipv6/etc/network.subr
==============================================================================
--- user/hrs/ipv6/etc/network.subr	Sun Sep 11 20:11:00 2011	(r225488)
+++ user/hrs/ipv6/etc/network.subr	Sun Sep 11 20:17:44 2011	(r225489)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109112017.p8BKHifo094093>