Skip to content

Conversation

@nuttxs
Copy link
Contributor

@nuttxs nuttxs commented Nov 6, 2025

Summary

netlib/netlib_delipv4dnsaddr.c: add DNS deletion functionality, support deleting DNS servers by address or by index:

netlib_del_ipv4dnsaddr()
netlib_del_ipv4dnsaddr_by_index()
netlib_del_ipv6dnsaddr()
netlib_del_ipv6dnsaddr_by_index()

Multi-DNS delete Call-Chain Implementation:
Application Layer: netlib_del_ipv4dnsaddr() / netlib_del_ipv6dnsaddr()
           ↓
Network Layer: dns_del_nameserver()
           ↓
Storage Layer: g_dns_servers[] array

Depend on PR#apache/nuttx#17284

Impact

New Feature/Change: Yes
User Impact: support delete the DNS server address by index or address
Build Impact:No new Kconfig options or build system changes.
Hardware Impact: No
Security: No
Compatibility: Backward-compatible; no breaking changes.

Testing

Test process example

// Add the first DNS server
netlib_set_ipv4dnsaddr(&dns1);

// Add the second DNS server
netlib_set_ipv4dnsaddr(&dns2);

// List all DNS servers
dns_foreach_nameserver(print_dns_callback, &count);

// Delete DNS server by index
netlib_del_ipv4dnsaddr_by_index(0);

// Delete DNS server by address
netlib_del_ipv4dnsaddr(&dns2);

…dress

- Modify the DHCP-client data structure to support multiple DNS addresses
- Enhance DHCP-option parsing to extract all DNS-server addresses
- Set all received DNS-server addresses

Signed-off-by: nuttxs <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant