dig +bufsize=0 sets bufsize to 4096
When I send a query with dig, and set bufsize to 0, dig appears to ignore this and sets the bufsize to 4096.
BIND version used
Steps to reproduce
Use dig to send such a query:
dig +norec +bufsize=0 ke soa @kenic.anycastdns.cz
What is the current bug behavior?
dig sends an EDNS query with the bufsize set to 4096.
What is the expected correct behavior?
dig should send a non-EDNS query, as described in the man page. Even better, dig should send an EDNS query but with bufsize set to 0, as instructed by the user.
Relevant configuration files
No relevant configuration files.
Relevant logs and/or screenshots
Here is a tcpdump showing how dig has ignored my
+bufsize=0 setting, and set the buffer to 4096:
12:48:39.756643 IP (tos 0x0, ttl 64, id 15958, offset 0, flags [none], proto UDP (17), length 59) 192.168.178.34.51981 > 22.214.171.124.53: [udp sum ok] 8443 [1au] SOA? ke. ar: . OPT UDPsize=4096 (31)
I don't have enough knowledge of the code to suggest a fix.