From 5b56aa68af2e2eba752558f2b94e2aef670cb6e0 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 22 Jun 2022 13:45:46 +0200 Subject: [PATCH] Check that the UDP destination port is logged via dnstap (cherry picked from commit 8d8396c3a7d598e1e74be71bdc72a9452c0d520e) --- bin/tests/system/dnstap/tests.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/tests/system/dnstap/tests.sh b/bin/tests/system/dnstap/tests.sh index 40ea0b3995..2157fd8c6a 100644 --- a/bin/tests/system/dnstap/tests.sh +++ b/bin/tests/system/dnstap/tests.sh @@ -518,6 +518,12 @@ ret=0 if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` +echo_i "checking whether destination UDP port is logged for client queries" +ret=0 +$DNSTAPREAD ns3/dnstap.out.save | grep -Eq "CQ [0-9:.]+ -> 10.53.0.3:${PORT} UDP" || ret=1 +if [ $ret != 0 ]; then echo_i "failed"; fi +status=`expr $status + $ret` + HAS_PYYAML=0 if [ -x "$PYTHON" ] ; then $PYTHON -c "import yaml" 2> /dev/null && HAS_PYYAML=1