react/dns why limit udp max packet size? #575
-
I found that UdpTransportExecutor limit maxPacketSize=512;, and no setter() in this class. why not make this param editable?😄 |
Beta Was this translation helpful? Give feedback.
Answered by
WyriHaximus
Jun 11, 2024
Replies: 1 comment 2 replies
-
Well mainly because the maximum size a DNS package over UDP can be is 512 bytes as per RFC: https://www.rfc-editor.org/std/std75.txt#:~:text=DNS%20%5BRFC1035%5D%20specifies%20a%20message,this%20document%20is%20512%20bytes. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It shouldn't, but that's why we set up both at https://github.com/reactphp/dns/blob/3.x/src/Resolver/Factory.php#L164-L180 and then when that situation happens we try over TCP instead: https://github.com/reactphp/dns/blob/3.x/src/Query/SelectiveTransportExecutor.php#L69-L78