]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix "sending packet from" test
authorMark Andrews <marka@isc.org>
Sat, 14 Jun 2025 02:38:59 +0000 (12:38 +1000)
committerMark Andrews <marka@isc.org>
Sat, 14 Jun 2025 07:10:15 +0000 (17:10 +1000)
The specific address is not always available.

bin/tests/system/digdelv/tests.sh

index 190561e61027000cff9fdefe0abef87ab96a6705..99cd26b6408c81fb6db442f3d5aa9f8cc9629237 100644 (file)
@@ -1832,8 +1832,8 @@ if [ -x "$DELV" ]; then
     echo_i "checking delv +ns uses both address families ($n)"
     ret=0
     delv_with_opts -a ns1/anchor.dnskey +root +ns +hint=root.hint a a.example >delv.out.test$n || ret=1
-    grep -qF 'sending packet from 10.53' delv.out.test$n >/dev/null || ret=1
-    grep -qF 'sending packet from fd92:7065' delv.out.test$n >/dev/null || ret=1
+    grep -q 'sending packet from [0-9.]*#[0-9]* to' delv.out.test$n >/dev/null || ret=1
+    grep -q 'sending packet from [0-9a-f:]*#[0-9]* to' delv.out.test$n >/dev/null || ret=1
     if [ $ret -ne 0 ]; then echo_i "failed"; fi
     status=$((status + ret))
 
@@ -1841,8 +1841,8 @@ if [ -x "$DELV" ]; then
     echo_i "checking delv -4 +ns uses only IPv4 ($n)"
     ret=0
     delv_with_opts -a ns1/anchor.dnskey +root -4 +ns +hint=root.hint a a.example >delv.out.test$n || ret=1
-    grep -qF 'sending packet from 10.53' delv.out.test$n >/dev/null || ret=1
-    grep -qF 'sending packet from fd92:7065' delv.out.test$n >/dev/null && ret=1
+    grep -q 'sending packet from [0-9.]*#[0-9]* to' delv.out.test$n >/dev/null || ret=1
+    grep -q 'sending packet from [0-9a-f:]*#[0-9]* to' delv.out.test$n >/dev/null && ret=1
     if [ $ret -ne 0 ]; then echo_i "failed"; fi
     status=$((status + ret))
 
@@ -1850,8 +1850,8 @@ if [ -x "$DELV" ]; then
     echo_i "checking delv -6 +ns uses only IPv6 ($n)"
     ret=0
     delv_with_opts -a ns1/anchor.dnskey +root -6 +ns +hint=root.hint a a.example >delv.out.test$n || ret=1
-    grep -qF 'sending packet from 10.53' delv.out.test$n >/dev/null && ret=1
-    grep -qF 'sending packet from fd92:7065' delv.out.test$n >/dev/null || ret=1
+    grep -q 'sending packet from [0-9.]*#[0-9]* to' delv.out.test$n >/dev/null && ret=1
+    grep -q 'sending packet from [0-9a-f:]*#[0-9]* to' delv.out.test$n >/dev/null || ret=1
     if [ $ret -ne 0 ]; then echo_i "failed"; fi
     status=$((status + ret))
   fi