Quiet the 'UDP length [] does not match header length' message.

It is triggered frequently when discarding invalid packets that were
received on the DHCP port and it seems to have little significance.
This commit is contained in:
Nicholas J. Kain 2015-02-13 21:56:34 -05:00
parent b4b6ed8fd5
commit b6554c2931

View File

@ -195,11 +195,8 @@ static ssize_t get_raw_packet(struct client_state_t *cs,
return -1;
}
size_t iphdrlen = ntohs(packet.ip.tot_len);
if ((size_t)inc != iphdrlen) {
log_error("%s: UDP length [%zd] does not match header length field [%zu].",
client_config.interface, inc, iphdrlen);
if ((size_t)inc != iphdrlen)
return -2;
}
if (!cs->using_dhcp_bpf && !get_raw_packet_validate_bpf(&packet))
return -2;