nextpart ns3/named.run >/dev/null
dig_with_opts txt.example7. txt @$f1 >dig.out.$n.f1 || ret=1
# The forwarder for the "example7" zone should only be queried once.
-start_pattern="sending packet to 10\.53\.0\.6"
+start_pattern="sending packet from [^ ]* to 10\.53\.0\.6"
retry_quiet 5 wait_for_log ns3/named.run "$start_pattern"
check_sent 1 ns3/named.run "$start_pattern" ";txt\.example7\.[[:space:]]*IN[[:space:]]*TXT$" || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
nextpart ns7/named.run >/dev/null
dig_with_opts +noadd +noauth txt.example1. txt @10.53.0.7 >dig.out.$n.f7 || ret=1
received_pattern="received packet from 10\.53\.0\.1"
-start_pattern="sending packet to 10\.53\.0\.1"
+start_pattern="sending packet from [^ ]* to 10\.53\.0\.1"
retry_quiet 5 wait_for_log ns7/named.run "$received_pattern" || ret=1
check_sent 1 ns7/named.run "$start_pattern" ";\.[[:space:]]*IN[[:space:]]*NS$" || ret=1
sent=$(grep -c "10.53.0.7#.* (.): query '\./NS/IN' approved" ns4/named.run || true)
n=$((n + 1))
echo_i "checking recursive lookup to edns 512 + no tcp server does not cause query loops ($n)"
ret=0
-sent=$(grep -c -F "sending packet to 10.53.0.7" ns1/named.run)
+sent=$(grep -c "sending packet from [^ ]* to 10\.53\.0\.7" ns1/named.run)
if [ $sent -ge 10 ]; then
echo_i "ns1 sent $sent queries to ns7, expected less than 10"
ret=1