]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[rt25085]
authorckb <ckb@isc.org>
Wed, 24 Oct 2012 19:47:29 +0000 (14:47 -0500)
committerckb <ckb@isc.org>
Wed, 24 Oct 2012 19:47:29 +0000 (14:47 -0500)
3402. [bug] Correct interface numbers for IPv4 and IPv6 interfaces.
     [RT #25085]

CHANGES
bin/tests/system/ifconfig.sh

diff --git a/CHANGES b/CHANGES
index 01d5d7208334038d235c5cc7630f31eced757814..686deea75894c8d6cbe79ec38f33f438fdfdf609 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+3402.  [bug]           Correct interface numbers for IPv4 and IPv6 interfaces.
+                       [RT #25085] 
+
 3401.  [bug]           Addressed Coverity warnings. [RT #31484]
 
 3400.  [cleanup]       "named -V" can now report a source ID string, defined
index 1e1069fc1b8db63f8a1733e7b85afa3e77592ad5..e98ab524e683bc15f2a71367df115d9c89d35df7 100644 (file)
@@ -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