batman-adv: Check skb size before using encapsulated ETH+VLAN header
authorSven Eckelmann <sven@narfation.org>
Fri, 26 Feb 2016 16:56:13 +0000 (17:56 +0100)
committerAntonio Quartulli <a@unstable.cc>
Sun, 24 Apr 2016 07:37:21 +0000 (15:37 +0800)
commitc78296665c3d81f040117432ab9e1cb125521b0c
tree8fdc01e1c914e14e548192e611f036a0f479d0a6
parent5f44abd041c5f3be76d57579ab254d78e601315b
batman-adv: Check skb size before using encapsulated ETH+VLAN header

The encapsulated ethernet and VLAN header may be outside the received
ethernet frame. Thus the skb buffer size has to be checked before it can be
parsed to find out if it encapsulates another batman-adv packet.

Fixes: 420193573f11 ("batman-adv: softif bridge loop avoidance")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
net/batman-adv/soft-interface.c