Skip to content
Commit b6ae1953 authored by Robert Lubos's avatar Robert Lubos Committed by Carles Cufí
Browse files

net: dhcpv4: Fix potential packet leak in DHCPv4



Packet handlers registered with net_conn API should not use NET_CONTINUE
to report packet processing status. As they register for a specific
local port, it cannot be assumed someone else will handle the packet,
and for net_conn this status is not really handled differently from
NET_OK. Therefore, reporting NET_CONTINUE, and not freeing the packet,
can result in a packet leak.

Too short packets should not really be handled differently from other
malformed packets in DHCPv4 module, therefore report NET_DROP instead of
NET_CONTINUE.

Signed-off-by: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
parent 5a488c38
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment