# #-- tcp_conn_limit.test --# # source the master var file when it's there [ -f ../.tpkg.var.master ] && source ../.tpkg.var.master # use .tpkg.var.test for in test variable passing [ -f .tpkg.var.test ] && source .tpkg.var.test # Set unbound to limit all IPv4 addresses to 0 connections. # Make sure TCP connection fails. if uname | grep MINGW >/dev/null; then echo "no job control in shell on windows. end test" exit 0 fi PRE="../.." . ../common.sh get_make (cd $PRE; $MAKE streamtcp) # test query should fail. echo "> query www.example.com." $PRE/streamtcp -f 127.0.0.1@$UNBOUND_PORT www.example.com. A IN >outfile 2>&1 if test "$?" -eq 0; then echo "exit status OK" echo "> cat logfiles" cat outfile cat fwd.log cat unbound.log echo "Not OK" exit 1 else echo "exit status not OK" fi echo "> cat logfiles" cat outfile cat fwd.log cat unbound.log echo "OK" exit 0