mirror of
https://github.com/espressif/openthread.git
synced 2026-09-05 08:40:06 +00:00
[dns-client] add config to bind socket to thread netif (#12085)
This commit introduces a new configuration option `OPENTHREAD_CONFIG_DNS_CLIENT_BIND_UDP_TO_THREAD_NETIF` to control which network interface the DNS client's UDP socket binds to. When this config is set to 1, the socket is bound to the Thread network interface (`Ip6::kNetifThreadInternal`). When the config is set to 0, the socket is bound to the unspecified network interface (`Ip6::kNetifUnspecified`), allowing DNS messages to be sent and received over any available network interface. By default this new config is disabled. A new CMake option `OT_DNS_CLIENT_BIND_UDP_THREAD_NETIF` is also added to allow easy configuration of this feature. The test configurations are updated to ensure both behaviors are covered.
This commit is contained in:
@@ -204,6 +204,7 @@ ot_option(OT_DHCP6_CLIENT OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE "DHCP6 client")
|
||||
ot_option(OT_DHCP6_SERVER OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE "DHCP6 server")
|
||||
ot_option(OT_DIAGNOSTIC OPENTHREAD_CONFIG_DIAG_ENABLE "diagnostic")
|
||||
ot_option(OT_DNS_CLIENT OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE "DNS client")
|
||||
ot_option(OT_DNS_CLIENT_BIND_UDP_THREAD_NETIF OPENTHREAD_CONFIG_DNS_CLIENT_BIND_UDP_TO_THREAD_NETIF "bind DNS client socket to Thread netif")
|
||||
ot_option(OT_DNS_CLIENT_OVER_TCP OPENTHREAD_CONFIG_DNS_CLIENT_OVER_TCP_ENABLE "Enable dns query over tcp")
|
||||
ot_option(OT_DNS_DSO OPENTHREAD_CONFIG_DNS_DSO_ENABLE "DNS Stateful Operations (DSO)")
|
||||
ot_option(OT_DNS_UPSTREAM_QUERY OPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_ENABLE "Allow sending DNS queries to upstream")
|
||||
|
||||
Reference in New Issue
Block a user