nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

PPP: Use the DNS servers negotiated in the `IPCP` configuration

Open vshymanskyy opened this issue 2 years ago • 1 comments

DNS with PPP connections only work if CONFIG_NETDB_DNSSERVER_IPv4ADDR is manually set to DNS ip address (i.e. 0x08080808 for Google DNS). IPCP could be used to configure network-provided DNS address.

vshymanskyy avatar Sep 20 '22 15:09 vshymanskyy

Good point, currently the IP is got automatically, so we need to add support to get the DNS as well.

acassis avatar Sep 22 '22 10:09 acassis

It seems that NuttX supports the usage of IPCP-provided DNS servers by enabling the IPCP_GET_PRI_DNS and IPVP_GET_SEC_DNS defines. Then, you will be able to get the DNS servers automatically, and will not have to set the DNS on the CONFIG_NETDB_DNSSERVER_IPv4ADDR config. @vshymanskyy

I'm not sure why these defines were not a more explicit option in the menu config (at least I haven't found them there). Anyway, I did some tests here, and it seems that I'm getting the DNS servers properly.

duduita avatar Jul 25 '23 14:07 duduita