TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
4.27k stars 418 forks source link

SVCB auto-inclusion of relevant A records may result in duplicate records returned #641

Closed ruifung closed 1 year ago

ruifung commented 1 year ago

For example: If there are two SVCB records for _dns.resolver.arpa, i.e. for example, in the DDR use case with separate records for the doq and dot ALPN.

When the SVCB query is done using the DNS client in the web interface, it results in the same A record for the target specified in both SVCB records (which is the same target) being returned twice in the additional section. Perhaps not returning duplicate records there might be a good idea.

ShreyasZare commented 1 year ago

Thanks for the post. This is acceptable response where the client is supposed to prefer the A record in the additional section when available over the ipv4hint in the SVCB/HTTPS records. The IP hints in the records are to be only used when a client does not receive A/AAAA records in the additional section for the first connection attempt. It should then resolve the actual A/AAAA records and use them instead of the IP hints.

ruifung commented 1 year ago

I mean, it returns the same A record multiple times in the additional section. With 2 SVCB records referencing the same name. It returns the A record for that name twice in the additional section. Just thought it might be potentially problematic if there are either a lot of SVCB records, a lot of A records, or both.

In my case, i have A dns.home.arpa -> 192.168.0.53 SVCB _dns.resolver.arpa -> dns.home.arpa, alpn=dot SVCB _dns.resolver.arpa -> dns.home.arpa, alpn=doq

And a query for SVCB _dns.resolver.arpa, returns 2 SVCB records, and the A record twice.

ShreyasZare commented 1 year ago

Thanks for that feedback. Will take a look at it.

Also, you can use a single SVCB record with alpn set to dot,doq instead of two separate records.

ruifung commented 1 year ago

Not if they are (potentially) using different ports. But I suppose that will indeed work if they are on the same port.

ShreyasZare commented 1 year ago

Version 11.3 is now available which fixes this issue. Do update and let me know your feedback.