summaryrefslogtreecommitdiffstats
path: root/include/dhcp.h
diff options
context:
space:
mode:
authorMarcin Niestroj <m.niestroj@grinn-global.com>2018-10-23 15:15:31 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2018-10-26 11:41:12 +0200
commit54801db9f06af6f6390240a6489b77649463c0cb (patch)
tree36ac98dba1e589e4df610e888f392b19ae0bd89d /include/dhcp.h
parent2ab1c1bcc2c290b2e7a13b915d9e953b2cb2592d (diff)
downloadbarebox-54801db9f06af6f6390240a6489b77649463c0cb.tar.gz
barebox-54801db9f06af6f6390240a6489b77649463c0cb.tar.xz
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>
Diffstat (limited to 'include/dhcp.h')
-rw-r--r--include/dhcp.h1
1 files changed, 1 insertions, 0 deletions
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;