Skip to content
Commit d42eb134 authored by Robert Lubos's avatar Robert Lubos Committed by Carles Cufí
Browse files

net: dhcpv4: Prevent DHCP client from clearing the gateway



In case both, static IP address configuration and DHCP were used, and no
DHCP server was avaliable in the network, clearing the gateway address
rendered the network interface unusable as it's gateway configuration
was cleared.

Prevent this by removing the gateway clearing during the DHCP
inititalization. If the DHCP server is available in the network, the
gateway address will be overwriten after receiving the DHCP OFFER
message or cleared if there's no Router option is avaiable in the
DHCP OFFER message.

Signed-off-by: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
parent ae2509c7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment