[v9_9] fix dns_request_createvia assert

3474.	[bug]		nsupdate could assert when the local and remote
			address families didn't match. [RT #22897]
(cherry picked from commit ffff5d6792)
This commit is contained in:
Evan Hunt
2013-01-23 15:39:38 -08:00
parent 61748fa876
commit fc490116aa
3 changed files with 18 additions and 2 deletions

View File

@@ -222,6 +222,17 @@ $DIG +tcp version.bind txt ch @10.53.0.1 -p 5300 > dig.out.ns1.$n
grep "status: NOERROR" dig.out.ns1.$n > /dev/null || ret=1
[ $ret = 0 ] || { echo I:failed; status=1; }
n=`expr $n + 1`
echo "I:check that address family mismatch is handled ($n)"
$NSUPDATE <<END > /dev/null 2>&1 && ret=1
server ::1
local 127.0.0.1
update add 600 txt.example.nil in txt "test"
send
END
[ $ret = 0 ] || { echo I:failed; status=1; }
n=`expr $n + 1`
echo "I:check that unixtime serial number is correctly generated ($n)"
oldserial=`$DIG +short unixtime.nil. soa @10.53.0.1 -p 5300 | awk '{print $3}'` || ret=1