summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/client.c b/client.c
index e9645662..394bde2d 100644
--- a/client.c
+++ b/client.c
@@ -1389,7 +1389,12 @@ handle_dhcp(struct if_state *state, struct dhcp_message **dhcpp,
/* We have to have DHCP type to work */
if (get_option_uint8(&type, dhcp, DHO_MESSAGETYPE) == -1) {
- log_dhcp(LOG_ERR, "no DHCP type in", dhcp);
+ logger(LOG_ERR, "ignoring message; no DHCP type");
+ return 0;
+ }
+ /* Every DHCP message should include ServerID */
+ if (get_option_addr(&addr.s_addr, dhcp, DHO_SERVERID) == -1) {
+ logger(LOG_ERR, "ignoring message; no Server ID");
return 0;
}