Skip to content
Commit 4f9fe4c4 authored by Jukka Rissanen's avatar Jukka Rissanen Committed by Benjamin Cabé
Browse files

net: core: Do IPv4/6 packet checks only for those packet types



The check_ip() in net_core.c did not check that the packet
Ethernet type is either IPv4 or IPv6. This meant that we for
example checked TTL also for ARP packets which is pointless as
those are not IPv4 packets.

Fix this by checking the link layer protocol type of the packet
to be either IPv4 or IPv6 before doing L3 checks.

Signed-off-by: default avatarJukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit fc16c42b)
parent b57d4cc1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment