Skip to content
Commit 5a31f3d1 authored by Seppo Takalo's avatar Seppo Takalo Committed by Anas Nashif
Browse files

net: ppp: ipcp: Don't request DNS if not needed



When Kconfig option CONFIG_NET_L2_PPP_OPTION_DNS_USE is enabled,
Zephyr should request two DNS addresses in IPCP negotiation by sending
IPCP ConfReq for DNS otions using 0.0.0.0 as an address.

Remote peer may offer DNS by sending IPCP ConfNak with proper address.
This is explained in RFC 1332 and RFC 1877 (DNS extension).

When no DNS is required, we should only send IPCP ConfReq for IP
address, without having DNS fields in the same request.

However, when PPP is configured to serve a DNS using Kconfig option
CONFIG_NET_L2_PPP_OPTION_SERVE_DNS it should serve the DNS address in the
IPCP ConfNak message and from the ipcp.peer_options structure, not from
the ipcp.my_options.

This might break backward compatibility outside this repository
as DNS addresses used to be served from ipcp.my_options.

Signed-off-by: default avatarSeppo Takalo <seppo.takalo@nordicsemi.no>
parent 43e8753f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment