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

vlan_insert_tag can return NULL on errors. The bridge loop avoidance code
therefore has to check the return value of vlan_insert_tag for NULL before
it can safely operate on this pointer.

Fixes: 23721387c409 ("batman-adv: add basic bridge loop avoidance code")
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/bridge_loop_avoidance.c