summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/ztpv4
diff options
context:
space:
mode:
authorlprylli <49498490+lprylli@users.noreply.github.com>2019-05-22 02:15:26 -0700
committerPablo Mazzini <pmazzini@gmail.com>2019-05-22 10:15:26 +0100
commit5dce45b2b680c398f6052c14c0f7558add495130 (patch)
tree308a885dc4d10fc70b0f1ac18e1218a9fc6ce3bf /dhcpv4/ztpv4
parent1a0fc7419d4541c26b2d25b4d089a66853e91d76 (diff)
Ignore bytes after end of IP packet in BroadcastRawUDPConn.ReadFrom (#292)
When reading raw packets from the network, it can happen that the raw ethernet packet read has undefined bytes after the end of the ip packet (either from the network or in some cases from the local stack). Those bytes should not be passed to the dhcp-receiver otherwise the option parser which is picky about final padding byte will silently discard the dhcp-reply. Rename ipLen, udpLen variables with more explicit names to avoid confusion between header, payload, total length possibly considered in this function. Tested: ast2500 bmc reproducing the issue + existing go test for coverage. Signed-off-by: Loic Prylli <lprylli@netflix.com>
Diffstat (limited to 'dhcpv4/ztpv4')
0 files changed, 0 insertions, 0 deletions