]> git.ipfire.org Git - thirdparty/dhcpcd.git/commit
Move dhcp(v4) packet size check earlier (#295)
authorPetr Menšík <pemensik@redhat.com>
Fri, 16 Feb 2024 16:15:35 +0000 (17:15 +0100)
committerGitHub <noreply@github.com>
Fri, 16 Feb 2024 16:15:35 +0000 (16:15 +0000)
commit727c78f503d456875e2a3cee7609288b537d9d25
treee4c65cc594fc3b1b7ea25226c1b9d875112600d3
parent8ab7ca1eb4e9bb797d6e6d955c83d8a82f69a663
Move dhcp(v4) packet size check earlier (#295)

dhcp_handlebootp handled zero sized packets correctly, but
dhcp_redirect_dhcp did not have such protection. Move size check before
both of them. Size when called from dhcp_packet is checked by
is_packet_udp_bootp call. Only dhcp_recvmsg needs earlier checking to be
added.

Fixes #283
src/dhcp.c