[dsnsd-server] support handling of "A record" queries (#10364)

This commit adds support for responding to "A record" queries in the
DNS-SD server and discovery proxy.

If the query matches a host registered with the SRP server, the host's
IPv6 addresses are returned in the Additional Data section of the
response. If the query is resolved by the proxy, the `otPlatDnssd`
APIs are used to start/stop IPv4 address resolvers for the hostname
on the infrastructure network.

The `test_dnssd_discovery_proxy` unit test is updated to validate the
new functionality.
This commit is contained in:
Abtin Keshavarzian
2024-08-14 12:40:48 -07:00
committed by GitHub
parent ec0b2991a8
commit 1645880b8e
5 changed files with 406 additions and 64 deletions
@@ -196,7 +196,7 @@ class TestDnssdServerOnBr(thread_cert.TestCase):
})
# check some invalid queries
for qtype in ['A', 'CNAME']:
for qtype in ['CNAME']:
dig_result = digger.dns_dig(server_addr, host1_full_name, qtype)
self._assert_dig_result_matches(dig_result, {
'status': 'NOTIMP',
@@ -278,7 +278,7 @@ class TestDnssdServerOnMultiBr(thread_cert.TestCase):
self._verify_discovery_proxy_meshcop(br2_addr, br2.get_network_name(), host)
# 4. Check some invalid queries
for qtype in ['A', 'CNAME']:
for qtype in ['CNAME']:
dig_result = host.dns_dig(br2_addr, host1_full_name, qtype)
self._assert_dig_result_matches(dig_result, {
'status': 'NOTIMP',