Otherwise, we silently ignore the received packet and that makes hard to
debug issue.
type = dhcp_option_parse(message, length, parse_request, req, &error_message);
if (type < 0)
- return 0;
+ return type;
r = ensure_sane_request(server, req, message);
if (r < 0)
test.option_type.code = 0;
test.option_type.length = 0;
test.option_type.type = 0;
- assert_se(dhcp_server_handle_message(server, (DHCPMessage*)&test, sizeof(test)) == 0);
+ assert_se(dhcp_server_handle_message(server, (DHCPMessage*)&test, sizeof(test)) == -ENOMSG);
test.option_type.code = SD_DHCP_OPTION_MESSAGE_TYPE;
test.option_type.length = 1;
test.option_type.type = DHCP_DISCOVER;