addr_to_str(&addr, addrlen, as, sizeof(as));
verbose(VERB_ALGO, "auth zone %s transfer next HTTP fetch from %s started", zname, as);
}
- /* Create or refresh the list of of allow_notify addrs */
+ /* Create or refresh the list of allow_notify addrs */
probe_copy_masters_for_allow_notify(xfr);
return 1;
}
[ -f .tpkg.var.test ] && source .tpkg.var.test
PRE="../.."
+. ../common.sh
# do the test
echo "> dig www.example.com."
dig @localhost -p $UNBOUND_PORT www.example.com. | tee outfile
exit 1
fi
+# Test that notify is allowed from the webserver address
+get_ldns_notify
+echo "> ldns-notify -z example.com"
+$LDNS_NOTIFY -p $UNBOUND_PORT -z example.com 127.0.0.1 | tee outfile
+if grep "rcode: REFUSED" outfile; then
+ echo "Not OK"
+ exit 1
+else
+ echo "OK"
+fi
+
exit 0
# info x : print info
# test_tool_avail x : see if program in path and complain, exit if not.
# get_ldns_testns : set LDNS_TESTNS to executable ldns-testns
+# get_ldns_notify : set LDNS_NOTIFY to executable ldns-notify
# get_make : set MAKE to gmake or make tool.
# get_gcc : set cc or gcc in CC
# get_pcat : set PCAT, PCAT_DIFF and PCAT_PRINT executables.
fi
}
+# get ldns-notify tool in LDNS_NOTIFY variable.
+get_ldns_notify () {
+ if test -x "`which ldns-notify 2>&1`"; then
+ LDNS_NOTIFY=ldns-notify
+ else
+ LDNS_NOTIFY=/home/wouter/bin/ldns-notify
+ fi
+}
+
# get make tool in MAKE variable, gmake is used if present.
get_make () {
if test -x "`which gmake 2>&1`"; then