diff options
author | Marek Lindner <lindner_marek@yahoo.de> | 2011-12-07 14:02:50 +0400 |
---|---|---|
committer | Marek Lindner <lindner_marek@yahoo.de> | 2012-02-16 22:50:19 +0400 |
commit | 6e242f9037f8a82ce2608c20a5460b670b2d5ff4 (patch) | |
tree | 52cee5bbf5a80e8d7f218c537cb1982ca290ab20 /net/batman-adv/hard-interface.c | |
parent | a04ccd5970ec11f0b320971051435d86d3233c92 (diff) | |
download | linux-6e242f9037f8a82ce2608c20a5460b670b2d5ff4.tar.xz |
batman-adv: warn if added interface is part of a bridge
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/hard-interface.c')
-rw-r--r-- | net/batman-adv/hard-interface.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c index d3e0e32e51c6..68b667c1d85e 100644 --- a/net/batman-adv/hard-interface.c +++ b/net/batman-adv/hard-interface.c @@ -281,6 +281,14 @@ int hardif_enable_interface(struct hard_iface *hard_iface, if (!atomic_inc_not_zero(&hard_iface->refcount)) goto out; + /* hard-interface is part of a bridge */ + if (hard_iface->net_dev->priv_flags & IFF_BRIDGE_PORT) + pr_err("You are about to enable batman-adv on '%s' which " + "already is part of a bridge. Unless you know exactly " + "what you are doing this is probably wrong and won't " + "work the way you think it would.\n", + hard_iface->net_dev->name); + soft_iface = dev_get_by_name(&init_net, iface_name); if (!soft_iface) { |