coredns / coredns.io

CoreDNS website
https://coredns.io
165 stars 136 forks source link

bufsize default value should be 1232 #295

Open pemensik opened 1 year ago

pemensik commented 1 year ago

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.

pemensik commented 1 year ago

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.

chrisohaver commented 1 year ago

Can you open a pr that adjusts the documentation?

pemensik commented 1 year ago

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.