aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/batman-adv/hard-interface.c8
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,
281 if (!atomic_inc_not_zero(&hard_iface->refcount)) 281 if (!atomic_inc_not_zero(&hard_iface->refcount))
282 goto out; 282 goto out;
283 283
284 /* hard-interface is part of a bridge */
285 if (hard_iface->net_dev->priv_flags & IFF_BRIDGE_PORT)
286 pr_err("You are about to enable batman-adv on '%s' which "
287 "already is part of a bridge. Unless you know exactly "
288 "what you are doing this is probably wrong and won't "
289 "work the way you think it would.\n",
290 hard_iface->net_dev->name);
291
284 soft_iface = dev_get_by_name(&init_net, iface_name); 292 soft_iface = dev_get_by_name(&init_net, iface_name);
285 293
286 if (!soft_iface) { 294 if (!soft_iface) {