batman-adv: Avoid nullptr dereference in dat after vlan_insert_tag
authorSven Eckelmann <sven@narfation.org>
Sat, 2 Jul 2016 07:52:14 +0000 (09:52 +0200)
committerSimon Wunderlich <sw@simonwunderlich.de>
Tue, 5 Jul 2016 10:40:01 +0000 (12:40 +0200)
commit60154a1e0495ffb8343a95cefe1e874634572fa8
tree254fdeb46565e5e8e7f56782f60cfc713ebdffcc
parent10c78f5854d361ded4736c1831948e0a5f67b932
batman-adv: Avoid nullptr dereference in dat after vlan_insert_tag

vlan_insert_tag can return NULL on errors. The distributed arp table code
therefore has to check the return value of vlan_insert_tag for NULL before
it can safely operate on this pointer.

Fixes: be1db4f6615b ("batman-adv: make the Distributed ARP Table vlan aware")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
net/batman-adv/distributed-arp-table.c