# HG changeset patch # User Roy Marples # Date 1239563828 0 # Node ID 7682aae81f5776adb9067cd16dcf134a880c0273 # Parent 2c0ecff50c533e9c4cc04e96d46b6f750e644bd6 We should ignore DHCP messages without a ServerID, #166. diff -r 2c0ecff50c53 -r 7682aae81f57 client.c --- a/client.c Wed Mar 11 17:58:34 2009 +0000 +++ b/client.c Sun Apr 12 19:17:08 2009 +0000 @@ -1389,7 +1389,12 @@ /* 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; }