net: dhcp: fix option 54
Option 54 (Server Identifier) is something different than
SIADDR (Server IP address). Currently they are used
interchangeably. This causes DHCPNAK with DHCP servers that
have configured different values for each field.

Create new 'dhcp_serverip' field in 'struct dhcp_result', so we treat
option 54 separately. This fixes DHCP requests for servers that send
two different values for SIADDR and option 54 in DHCPOFFER.

Fixes: 528298b702a0 ("net: dhcp: rework")
Fixes: e18cc5b7e9ce ("DHCP: fix option 54 passing")
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 2ab1c1b commit 54801db9f06af6f6390240a6489b77649463c0cb
@Marcin Niestroj Marcin Niestroj authored on 23 Oct 2018
Sascha Hauer committed on 26 Oct 2018
Showing 2 changed files
View
include/dhcp.h
View
net/dhcp.c