From 54801db9f06af6f6390240a6489b77649463c0cb Mon Sep 17 00:00:00 2001 From: Marcin Niestroj Date: Tue, 23 Oct 2018 15:15:31 +0200 Subject: 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 Signed-off-by: Sascha Hauer --- include/dhcp.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/dhcp.h b/include/dhcp.h index ce5ed61c65..0dced8e9fa 100644 --- a/include/dhcp.h +++ b/include/dhcp.h @@ -28,6 +28,7 @@ struct dhcp_result { IPaddr_t gateway; IPaddr_t nameserver; IPaddr_t serverip; + IPaddr_t dhcp_serverip; char *hostname; char *domainname; char *rootpath; -- cgit v1.2.3