3402. [bug] Correct interface numbers for IPv4 and IPv6 interfaces.
[RT #25085]
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
@@ -48,18 +48,18 @@ fi
|
||||
# on a NFS mounted disk.
|
||||
|
||||
case `uname -a` in
|
||||
*HP-UX*) sys=hpux ;;
|
||||
*) sys=`sh $config_guess` ;;
|
||||
*HP-UX*) sys=hpux ;;
|
||||
*) sys=`sh $config_guess` ;;
|
||||
esac
|
||||
|
||||
case "$2" in
|
||||
[0-9]|[1-9][0-9]|[1-9][0-9][0-9]) base=$2;;
|
||||
*) base=""
|
||||
[1-9]|[1-9][0-9]|[1-9][0-9][0-9]) base=$2;;
|
||||
*) base="1"
|
||||
esac
|
||||
|
||||
case "$3" in
|
||||
[0-9]|[1-9][0-9]|[1-9][0-9][0-9]) base6=$2;;
|
||||
*) base6=""
|
||||
[1-9]|[1-9][0-9]|[1-9][0-9][0-9]) base6=$3;;
|
||||
*) base6=$base
|
||||
esac
|
||||
|
||||
case "$1" in
|
||||
@@ -87,7 +87,7 @@ case "$1" in
|
||||
ifconfig lo0:$int 10.53.0.$ns netmask 0xffffffff up
|
||||
;;
|
||||
*-*-solaris2.[8-9]|*-*-solaris2.1[0-9])
|
||||
/sbin/ifconfig lo0:$int plumb
|
||||
/sbin/ifconfig lo0:$int plumb
|
||||
/sbin/ifconfig lo0:$int 10.53.0.$ns up
|
||||
if test -n "$int6"
|
||||
then
|
||||
@@ -99,7 +99,7 @@ case "$1" in
|
||||
*-*-linux*)
|
||||
ifconfig lo:$int 10.53.0.$ns up netmask 255.255.255.0
|
||||
ifconfig lo inet6 add fd92:7065:b8e:ffff::$ns/64
|
||||
;;
|
||||
;;
|
||||
*-unknown-freebsd*)
|
||||
ifconfig lo0 10.53.0.$ns alias netmask 0xffffffff
|
||||
ifconfig lo0 inet6 fd92:7065:b8e:ffff::$ns alias
|
||||
@@ -131,7 +131,7 @@ case "$1" in
|
||||
hpux)
|
||||
ifconfig lo0:$int 10.53.0.$ns netmask 255.255.255.0 up
|
||||
ifconfig lo0:$int inet6 fd92:7065:b8e:ffff::$ns up
|
||||
;;
|
||||
;;
|
||||
*-sco3.2v*)
|
||||
ifconfig lo0 alias 10.53.0.$ns
|
||||
;;
|
||||
@@ -139,7 +139,7 @@ case "$1" in
|
||||
ifconfig lo0 alias 10.53.0.$ns
|
||||
ifconfig lo0 inet6 fd92:7065:b8e:ffff::$ns alias
|
||||
;;
|
||||
*)
|
||||
*)
|
||||
echo "Don't know how to set up interface. Giving up."
|
||||
exit 1
|
||||
esac
|
||||
@@ -153,7 +153,13 @@ case "$1" in
|
||||
then
|
||||
int=`expr $ns + $base - 1`
|
||||
else
|
||||
int=$ns
|
||||
int=$ns
|
||||
fi
|
||||
if test -n "$base6"
|
||||
then
|
||||
int6=`expr $ns + $base6 - 1`
|
||||
else
|
||||
int6=$ns
|
||||
fi
|
||||
case "$sys" in
|
||||
*-pc-solaris2.5.1)
|
||||
@@ -174,7 +180,7 @@ case "$1" in
|
||||
*-*-linux*)
|
||||
ifconfig lo:$int 10.53.0.$ns down
|
||||
ifconfig lo inet6 del fd92:7065:b8e:ffff::$ns/64
|
||||
;;
|
||||
;;
|
||||
*-unknown-freebsd*)
|
||||
ifconfig lo0 10.53.0.$ns delete
|
||||
ifconfig lo0 inet6 fd92:7065:b8e:ffff::$ns delete
|
||||
@@ -206,7 +212,7 @@ case "$1" in
|
||||
hpux)
|
||||
ifconfig lo0:$int 0.0.0.0
|
||||
ifconfig lo0:$int inet6 ::
|
||||
;;
|
||||
;;
|
||||
*-sco3.2v*)
|
||||
ifconfig lo0 -alias 10.53.0.$ns
|
||||
;;
|
||||
@@ -214,7 +220,7 @@ case "$1" in
|
||||
ifconfig lo0 -alias 10.53.0.$ns
|
||||
ifconfig lo0 inet6 fd92:7065:b8e:ffff::$ns delete
|
||||
;;
|
||||
*)
|
||||
*)
|
||||
echo "Don't know how to destroy interface. Giving up."
|
||||
exit 1
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user