Merge branch '2779-name-in-answer-doesn-t-match-the-name-in-query' into 'main'
Resolve "name in answer doesn't match the name in query" Closes #2779 See merge request isc-projects/bind9!5194
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,3 +1,6 @@
|
||||
5659. [bug] 'W' in wildcard expansions was being mapped to '\000'.
|
||||
[GL #2779]
|
||||
|
||||
5658. [bug] Increasing "max-cache-size" for a running named instance
|
||||
(using "rndc reconfig") was not causing the hash tables
|
||||
used by cache databases to be grown accordingly. This
|
||||
|
||||
@@ -239,5 +239,40 @@ grep "ANSWER: 0," dig.out.ns1.test$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "check wild card expansions by code point ($n)"
|
||||
ret=0
|
||||
i=0
|
||||
while test $i -lt 256
|
||||
do
|
||||
x=`expr 00$i : '.*\(...\)$'`
|
||||
$DIG $DIGOPTS @10.53.0.1 "\\$x.example" TXT > dig.out.ns1.$x.test$n
|
||||
if test $i -le 32 -o $i -ge 127
|
||||
then
|
||||
grep '^\\'"$x"'\.example\..*TXT.*\"this is a wildcard\"$' dig.out.ns1.$x.test$n > /dev/null || { echo_i "code point $x failed" ; ret=1; }
|
||||
# "=34 $=36 (=40 )=41 .=46 ;=59 \=92 @=64
|
||||
elif test $i -eq 34 -o $i -eq 36 -o $i -eq 40 -o $i -eq 41 -o \
|
||||
$i -eq 46 -o $i -eq 59 -o $i -eq 64 -o $i -eq 92
|
||||
then
|
||||
case $i in
|
||||
34) a='"';;
|
||||
36) a='$';;
|
||||
40) a='(';;
|
||||
41) a=')';;
|
||||
46) a='\.';;
|
||||
59) a=';';;
|
||||
64) a='@';;
|
||||
92) a='\\';;
|
||||
*) a=''; echo_i "code point $x failed" ; ret=1 ;;
|
||||
esac
|
||||
grep '^\\'"$a"'\.example.*.*TXT.*"this is a wildcard"$' dig.out.ns1.$x.test$n > /dev/null || { echo_i "code point $x failed" ; ret=1; }
|
||||
else
|
||||
grep '^\\' dig.out.ns1.$x.test$n && { echo_i "code point $x failed" ; ret=1; }
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "exit status: $status"
|
||||
[ $status -eq 0 ] || exit 1
|
||||
|
||||
@@ -48,3 +48,8 @@ Bug Fixes
|
||||
lacked the necessary NSEC records or contained duplicate NSEC records
|
||||
when both wildcard expansion and CNAME chaining were required to
|
||||
prepare the response. This has been fixed. :gl:`#2759`
|
||||
|
||||
- Queries where the wildcard match contained the letter ``W`` failed
|
||||
to return the correct response as the ``W`` was mapped to ``\000``.
|
||||
:gl:`#2779`
|
||||
|
||||
|
||||
@@ -9874,7 +9874,8 @@ static const unsigned char maptolower[256] = {
|
||||
['F'] = 'f', ['G'] = 'g', ['H'] = 'h', ['I'] = 'i', ['J'] = 'j',
|
||||
['K'] = 'k', ['L'] = 'l', ['M'] = 'm', ['N'] = 'n', ['O'] = 'o',
|
||||
['P'] = 'p', ['Q'] = 'q', ['R'] = 'r', ['S'] = 's', ['T'] = 't',
|
||||
['U'] = 'u', ['V'] = 'v', ['X'] = 'x', ['Y'] = 'y', ['Z'] = 'z',
|
||||
['U'] = 'u', ['V'] = 'v', ['W'] = 'w', ['X'] = 'x', ['Y'] = 'y',
|
||||
['Z'] = 'z',
|
||||
};
|
||||
|
||||
static const unsigned char maptoupper[256] = {
|
||||
@@ -9882,7 +9883,8 @@ static const unsigned char maptoupper[256] = {
|
||||
['f'] = 'F', ['g'] = 'G', ['h'] = 'H', ['i'] = 'I', ['j'] = 'J',
|
||||
['k'] = 'K', ['l'] = 'L', ['m'] = 'M', ['n'] = 'N', ['o'] = 'O',
|
||||
['p'] = 'P', ['q'] = 'Q', ['r'] = 'R', ['s'] = 'S', ['t'] = 'T',
|
||||
['u'] = 'U', ['v'] = 'V', ['x'] = 'X', ['y'] = 'Y', ['z'] = 'Z',
|
||||
['u'] = 'U', ['v'] = 'V', ['w'] = 'W', ['x'] = 'X', ['y'] = 'Y',
|
||||
['z'] = 'Z',
|
||||
};
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user