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

net: dhcpv4: Fix requested IP address overwrite



It could happen, that the requested IP address, stored in the dhcpv4
config structure in the network interface, could get overwritten with an
unexpected message, for example NAK from the DHCP server. In result, the
DHCPv4 module was no longer able to remove the requested address from
the network interface, as it simply no longer remembered what the
address was.

Fix this, by setting the requested address only when it's actually
provided by the DHCP server, i. e. when handling the OFFER message from
the server. Accordingly, the requested address will be cleared when the
SELECTING stage is entered, where all of the cleanups should've already
be done.

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