The `edns-udp-size` sets the advertised buffer size in the responses
The max-udp-size
controls the amount of the data put into the request, but the edns-udp-size
is the value that's put in the responses coming from the resolver. A simple test with following named.conf
will confirm the behaviour:
options {
max-udp-size 512;
edns-udp-size 1232;
};
And dig +bufsize=4096 @localhost
to confirm:
; <<>> DiG 9.17.4 <<>> -p 5300 +bufsize @localhost
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26389
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: e379761b8aa9b4f4010000005f611030d22f78d5a864fc70 (good)
;; QUESTION SECTION:
;. IN NS
;; ANSWER SECTION:
. 518399 IN NS c.root-servers.net.
. 518399 IN NS l.root-servers.net.
. 518399 IN NS m.root-servers.net.
. 518399 IN NS b.root-servers.net.
. 518399 IN NS f.root-servers.net.
. 518399 IN NS d.root-servers.net.
. 518399 IN NS k.root-servers.net.
. 518399 IN NS e.root-servers.net.
. 518399 IN NS h.root-servers.net.
. 518399 IN NS i.root-servers.net.
. 518399 IN NS j.root-servers.net.
. 518399 IN NS g.root-servers.net.
. 518399 IN NS a.root-servers.net.
;; Query time: 0 msec
;; SERVER: ::1#5300(::1)
;; WHEN: Tue Sep 15 21:04:16 CEST 2020
;; MSG SIZE rcvd: 279
e.g. the size was capped to 512 (whole ADDITIONAL
section was dropped), but the advertised buffer size is still 1232
in the response.