apache / nuttx

Apache NuttX is a mature, real-time embedded operating system (RTOS)
https://nuttx.apache.org/
Apache License 2.0
2.84k stars 1.17k forks source link

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

Open vshymanskyy opened 2 years ago

vshymanskyy commented 2 years ago

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.

acassis commented 2 years ago

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

duduita commented 1 year ago

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.