summaryrefslogtreecommitdiff
path: root/net/batman-adv/soft-interface.h
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2011-03-05 00:36:41 +0300
committerMarek Lindner <lindner_marek@yahoo.de>2011-03-05 14:52:09 +0300
commite44d8fe2b5c27ecc230f886d4cc49fcbd86f87a0 (patch)
tree1ed6d2b1fa04a4fe333d8eda498b3e866129d4d3 /net/batman-adv/soft-interface.h
parent7cefb149a6b0e4f7c5adfa27dcf285b729063848 (diff)
downloadlinux-e44d8fe2b5c27ecc230f886d4cc49fcbd86f87a0.tar.xz
batman-adv: Disallow regular interface as mesh device
When trying to associate a net_device with another net_device which already exists, batman-adv assumes that this interface is a fully initialized batman mesh interface without checking it. The behaviour when accessing data behind netdev_priv of a random net_device is undefined and potentially dangerous. Reported-by: Linus Lüssing <linus.luessing@ascom.ch> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/soft-interface.h')
-rw-r--r--net/batman-adv/soft-interface.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/batman-adv/soft-interface.h b/net/batman-adv/soft-interface.h
index 80a3607df186..4789b6f2a0b3 100644
--- a/net/batman-adv/soft-interface.h
+++ b/net/batman-adv/soft-interface.h
@@ -31,5 +31,6 @@ void interface_rx(struct net_device *soft_iface,
int hdr_size);
struct net_device *softif_create(char *name);
void softif_destroy(struct net_device *soft_iface);
+int softif_is_valid(struct net_device *net_dev);
#endif /* _NET_BATMAN_ADV_SOFT_INTERFACE_H_ */