coredns.io icon indicating copy to clipboard operation
coredns.io copied to clipboard

bufsize default value should be 1232

Open pemensik opened this issue 1 year ago • 3 comments

According to http://www.dnsflagday.net/2020/, the default value for incoming requests should be 1232. It is experimentally chosen good default value, unless the administrator knows better value.

Current examples are confusing and misleading. If the incoming request did not contain OPT record, that means EDNS0 header, then the server must not send the answer larger than 512 bytes. It may not solve it by adding EDNS0 header to response.

  • Related commit: https://github.com/coredns/coredns/commit/a5b9749462a9717c8920dba095f242611c61a989

pemensik avatar Jun 30 '23 15:06 pemensik

The correct behaviour were fixed by https://github.com/coredns/coredns/pull/5368, but the documentation is still misleading. Especially examples with value 512 should have never be presented.

pemensik avatar Jun 30 '23 15:06 pemensik

Can you open a pr that adjusts the documentation?

chrisohaver avatar Jun 30 '23 15:06 chrisohaver

Hmm, on the second glance, I am not sure it works described way anymore. It can change EDNS0 size only if it were already present in query. But it cannot add EDNS header into forwarded packet if it were not there already. It can also only reduce received value further, never increase it.

pemensik avatar Jun 30 '23 16:06 pemensik