From 01b11c24ecc31dee95ae9ae9a375b5ce92c6fe73 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 6 Aug 2019 16:35:28 +1000 Subject: [PATCH] Configure 'mapped' IPv4 address 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 | 22 ++++++++++++++++------ bin/tests/system/org.isc.bind.system | 1 + 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/bin/tests/system/ifconfig.sh.in b/bin/tests/system/ifconfig.sh.in index ed84fd19d7..0f2eabcc4b 100755 --- a/bin/tests/system/ifconfig.sh.in +++ b/bin/tests/system/ifconfig.sh.in @@ -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;; diff --git a/bin/tests/system/org.isc.bind.system b/bin/tests/system/org.isc.bind.system index 6c5a8cd4fe..df5c90b056 100644 --- a/bin/tests/system/org.isc.bind.system +++ b/bin/tests/system/org.isc.bind.system @@ -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