mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
[master] dig can now learn the SIT value when retrying
4093. [func] Dig now learns the SIT value from truncated responses when it retries over TCP. [RT #39047]
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -28,6 +28,12 @@ getsit() {
|
||||
}' < $1
|
||||
}
|
||||
|
||||
fullsit() {
|
||||
awk 'BEGIN { n = 0 }
|
||||
// { v[n++] = length(); }
|
||||
END { print (v[1] == v[2]); }'
|
||||
}
|
||||
|
||||
havetc() {
|
||||
grep 'flags:.* tc[^;]*;' $1 > /dev/null
|
||||
}
|
||||
@@ -87,6 +93,17 @@ grep "; SIT:.*(good)" dig.out.test$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo "I:checking SIT is learnt for TCP retry ($n)"
|
||||
ret=0
|
||||
$DIG +qr +sit large.example txt @10.53.0.1 -p 5300 > dig.out.test$n
|
||||
linecount=`getsit dig.out.test$n | wc -l`
|
||||
if [ $linecount != 3 ]; then ret=1; fi
|
||||
checkfull=`getsit dig.out.test$n | fullsit`
|
||||
if [ $checkfull != 1 ]; then ret=1; fi
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo "I:checking for SIT value in adb ($n)"
|
||||
ret=0
|
||||
|
Reference in New Issue
Block a user