]> git.ipfire.org Git - thirdparty/samba.git/commit
Minimal EDNS0 support for built-in DNS client
authorMichael Tokarev <mjt@tls.msk.ru>
Mon, 26 Feb 2024 11:15:00 +0000 (14:15 +0300)
committerPavel Filipensky <pfilipensky@samba.org>
Thu, 2 Jan 2025 17:01:30 +0000 (17:01 +0000)
commitf2ddd2f306c17b52d948b47b64f12a928c6c98e6
tree7395a539866328b0fda505955fa257adbf63cc5c
parent4ecbdd689a978491d5d0297d98de7ce4127f81ee
Minimal EDNS0 support for built-in DNS client

Currently, samba built-in DNS client is UDP-only (it does
support TCP mode, but not all components use it).  In
particular, when winbind queries list of AD DCs (SRV
record) which can be quite large, it uses UDP-only query.
And at the same time, samba DNS client does not support
EDNS0 at all, so the reply is limited to standard DNS
packet size which is 512 bytes.

Add minimal EDNS0 OPT record to ADDITIONAL section when
sending a DNS request out, indicating we can accept
DNS packets up to 4Kb in size.

Since DNSSEC is in wide use today and DNSSEC requires
EDNS0, it is okay to assume ENDS0 is widely supported
these days, so there should be no regressions when
enabling EDNS0.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
libcli/dns/dns.c