]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Configure 'mapped' IPv4 address
authorMark Andrews <marka@isc.org>
Tue, 6 Aug 2019 06:35:28 +0000 (16:35 +1000)
committerMark Andrews <marka@isc.org>
Wed, 13 Sep 2023 04:31:43 +0000 (14:31 +1000)
Add a mapped IPv4 address, fd92:7065:b8e:fffe::10.53.0.4, to
ifconfig.sh for dns64 testing.

bin/tests/system/ifconfig.sh.in
bin/tests/system/org.isc.bind.system

index ed84fd19d78ab4b7cdca75935e21dfed9bf6e56f..0f2eabcc4b52c9f11b731e2e3020399812f95779 100755 (executable)
@@ -20,6 +20,7 @@
 # IPv6: fd92:7065:b8e:ffff::{1..11}            ULA
 #       fd92:7065:b8e:99ff::{1..2}
 #       fd92:7065:b8e:ff::{1..2}
+#       fd92:7065:b8e:fffe::10.53.0.4
 #
 # We also set the MTU on the 1500 bytes to match the default MTU on physical
 # interfaces, so we can properly test the cases with packets bigger than
@@ -80,9 +81,9 @@ up() {
               ;;
            *-*-linux*)
                if [ "$use_ip" ]; then
-                       ip address add $a/24 dev lo:$int
-                       ip link set dev lo:$int mtu 1500
+                       [ "$a" ] && ip address add $a/24 dev lo:$int
                        [ "$aaaa" ] && ip address add $aaaa/64 dev lo
+                       ip link set dev lo:$int mtu 1500
                else
                        ifconfig lo:$int $a up netmask 255.255.255.0 mtu 1500
                        [ "$aaaa" ] && ifconfig lo inet6 add $aaaa/64
@@ -240,7 +241,7 @@ sequence() (
 max=11
 case $1 in
     start|up|stop|down)
-       for i in $(sequence 0 2)
+       for i in $(sequence 0 3)
        do
                case $i in
                  0) ipv6="ff" ;;
@@ -250,10 +251,19 @@ case $1 in
                esac
                for ns in $(sequence 1 $max)
                do
-                       [ $i -gt 0 -a $ns -gt 2 ] && break
                        int=$((i * max + ns))
-                       a=10.53.$i.$ns
-                       aaaa=fd92:7065:b8e:${ipv6}ff::$ns
+                       case $i in
+                       0|1|2)
+                               [ $i -gt 0 -a $ns -gt 3 ] && break
+                               a=10.53.$i.$ns
+                               aaaa=fd92:7065:b8e:${ipv6}ff::$ns
+                               ;;
+                       3)
+                               [ $ns -ne 4 ] && continue
+                               a=
+                               aaaa=fd92:7065:b8e:fffe::10.53.0.$ns
+                               ;;
+                       esac
                        case "$1" in
                            start|up) up;;
                            stop|down) down;;
index 6c5a8cd4fe02078bcdad73f76f62e7ea2b21336f..df5c90b056851e34e607ed197ebd86bb5273b4bb 100644 (file)
@@ -27,3 +27,4 @@ do
        ifup 1 99 $ns
        ifup 2 00 $ns
 done
+/sbin/ifconfig lo0 inet6 fd92:7065:b8e:fffe::10.53.0.4 alias