2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Change the default EDNS buffer size for dig, mdig and host to 1232

The dig should behave closely to how the resolver code in `named` work,
so we need to change the buffer size in dig, mdig and host too.
This commit is contained in:
Ondřej Surý
2020-09-30 18:18:05 +02:00
committed by Ondřej Surý
parent f1556f8c41
commit 63c29dcdfa
3 changed files with 5 additions and 5 deletions

View File

@@ -73,7 +73,7 @@
#define LOOKUP_LIMIT 64
#define DEFAULT_EDNS_VERSION 0
#define DEFAULT_EDNS_BUFSIZE 4096
#define DEFAULT_EDNS_BUFSIZE 1232
/*%
* Lookup_limit is just a limiter, keeping too many lookups from being

View File

@@ -958,10 +958,10 @@ if [ -x "$DIG" ] ; then
echo_i "check that dig +bufsize restores default bufsize ($n)"
ret=0
dig_with_opts @10.53.0.3 a.example +bufsize=0 +bufsize +qr > dig.out.test$n 2>&1 || ret=1
lines=`grep "EDNS:.* udp:" dig.out.test$n | wc -l`
lines1232=`grep "EDNS:.* udp: 1232" dig.out.test$n | wc -l`
lines4096=`grep "EDNS:.* udp: 4096" dig.out.test$n | wc -l`
test $lines1232 -eq 1 || ret=1
test $lines4096 -eq 1 || ret=1
test $lines -eq 2 || ret=1
test $lines1232 -eq 2 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))

View File

@@ -638,7 +638,7 @@ sendquery(struct query *query, isc_task_t *task) {
unsigned char cookie[40];
if (query->udpsize == 0) {
query->udpsize = 4096;
query->udpsize = 1232;
}
if (query->edns < 0) {
query->edns = 0;