]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
batman-adv: fix header size check in batadv_dbg_arp()
authorMatthias Schiffer <mschiffer@universe-factory.net>
Fri, 16 Mar 2018 10:29:10 +0000 (11:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:50:37 +0000 (07:50 +0200)
commit33e0acf13c744efefba4322c1963968f538ff671
tree316044402934728c0d1cf4e076a6f485271b12ef
parent58df28952c377af5b055be678e8e922a4a8ea3e5
batman-adv: fix header size check in batadv_dbg_arp()

[ Upstream commit 6f27d2c2a8c236d296201c19abb8533ec20d212b ]

Checking for 0 is insufficient: when an SKB without a batadv header, but
with a VLAN header is received, hdr_size will be 4, making the following
code interpret the Ethernet header as a batadv header.

Fixes: be1db4f6615b ("batman-adv: make the Distributed ARP Table vlan aware")
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/batman-adv/distributed-arp-table.c