Commit 63c29dcd authored by Ondřej Surý's avatar Ondřej Surý Committed by Ondřej Surý

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.
parent f1556f8c
......@@ -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
......
......@@ -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))
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment