The change introduced with https://bugzilla.samba.org/show_bug.cgi?id=15536 causes client side dns problems. Because we ask for 4096 bytes udp responses, which are likely to be dropped by routers and firewalls. We have a lot of fixes in 4.25.0rc1, but they need backporting to older branches.
I'm curious where you have such large replies which are being dropped. What is the DNS server which you query and where it's located? I dunno how, but here things just works with 4096 bytes replies over LAN with the standard 1500 MTU size. Maybe the OS splits the larger packet into several pieces and assembles it back on the receive end? It shouldn't happen for UDP if memory serves me right. It definitely works over loopback, and without that patch (with 4096 bytes size), this setup wont work here at all due to too large list of SRV records which samba is not able to retrieve over UDP.
I think the bug title should be "DNS client", not "DNC client" :)
(In reply to Michael Tokarev from comment #1) In the last 2 days I had 2 customers having problems with dns messages sizes over udp, see also https://bugzilla.samba.org/show_bug.cgi?id=15988. One hat a problem with 4.22.10 as client (this bug) and a Windows DC as DNS server in a different subnet where a response of ~2500 bytes was dropped between the networks. And the other one with a Windows 11 client and a Samba DC, where a response of ~800 bytes was still dropped between networks.
Created attachment 19173 [details] Patch for v4-25-test
Created attachment 19174 [details] Patches for v4-24-test
Created attachment 19175 [details] Patches for v4-23-test
This bug was referenced in samba v4-23-test: 4cc3cfc3d5f312f4f38315303d78198b9a5a92ee f7fd813a942056e1b1075711663cfde01965f63d d1c14f5ca885f6f8f76ce69ab8d8dd492514b73a c0830db3dfc9a6963d35b4d2084d7f7de58ae1f3 f8365769831c6c040fcb1b97cee7d2d08085603c 599f5fcf2daafbf18d797af5cec3e0b76c4e9d91 a39ca9d21bc5377a873e22945b6e797b0a5104c6 57e14d461fb8e94b670a5ed914c44e9686626a08 96c7be3b2e286a676f3428ac72c5aecd26a04d21
This bug was referenced in samba v4-25-test: 980de7dd837ef369248caca55e7d6719b07d8bb5
This bug was referenced in samba v4-24-test: 35744d77898c9779012927f73355cfd0447614fd 6ee7f0dc17f1348f40c8bd4056731b0804f21984 71b72ccc5ab9be737df00649dc714734486c4947 2e0fa9df61f78c789a55ea5a22c2a346578f51a2 d72c26c4301160520e241b81f3550886a4c39b61 fac98d611f24eaee1b9e9677a41577e77b9a818d f8bce5686f53191483575bfdb34f1ef58ac9946a e62c39b8863dc87a787b8fde42f8e0eb082e722f 52c25206890f99223e35fa78de2de555749569e6
This bug was referenced in samba v4-23-stable (Release samba-4.23.12): 4cc3cfc3d5f312f4f38315303d78198b9a5a92ee f7fd813a942056e1b1075711663cfde01965f63d d1c14f5ca885f6f8f76ce69ab8d8dd492514b73a c0830db3dfc9a6963d35b4d2084d7f7de58ae1f3 f8365769831c6c040fcb1b97cee7d2d08085603c 599f5fcf2daafbf18d797af5cec3e0b76c4e9d91 a39ca9d21bc5377a873e22945b6e797b0a5104c6 57e14d461fb8e94b670a5ed914c44e9686626a08 96c7be3b2e286a676f3428ac72c5aecd26a04d21
This bug was referenced in samba v4-25-stable (Release samba-4.25.0rc2): 980de7dd837ef369248caca55e7d6719b07d8bb5
This bug was referenced in samba v4-24-stable (Release samba-4.24.7): 35744d77898c9779012927f73355cfd0447614fd 6ee7f0dc17f1348f40c8bd4056731b0804f21984 71b72ccc5ab9be737df00649dc714734486c4947 2e0fa9df61f78c789a55ea5a22c2a346578f51a2 d72c26c4301160520e241b81f3550886a4c39b61 fac98d611f24eaee1b9e9677a41577e77b9a818d f8bce5686f53191483575bfdb34f1ef58ac9946a e62c39b8863dc87a787b8fde42f8e0eb082e722f 52c25206890f99223e35fa78de2de555749569e6