b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Marek Lindner <lindner_marek@yahoo.de>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org,
	Marek Lindner <lindner_marek@yahoo.de>
Subject: [B.A.T.M.A.N.] [PATCH 06/10] batman-adv: warn if added interface is part of a bridge
Date: Fri, 17 Feb 2012 15:18:26 +0800	[thread overview]
Message-ID: <1329463110-856-7-git-send-email-lindner_marek@yahoo.de> (raw)
In-Reply-To: <1329463110-856-1-git-send-email-lindner_marek@yahoo.de>

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
---
 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 d3e0e32..68b667c 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) {
-- 
1.7.9


  parent reply	other threads:[~2012-02-17  7:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-17  7:18 [B.A.T.M.A.N.] pull request: batman-adv 2012-02-17 Marek Lindner
2012-02-17  7:18 ` [B.A.T.M.A.N.] [PATCH 01/10] batman-adv: add tt_initialised flag to the orig_node struct Marek Lindner
2012-02-17  7:18 ` [B.A.T.M.A.N.] [PATCH 02/10] batman-adv: Explicitly mark the common header structure Marek Lindner
2012-02-17  7:18 ` [B.A.T.M.A.N.] [PATCH 03/10] batman-adv: simplify bat_ogm_receive API call Marek Lindner
2012-02-17  7:18 ` [B.A.T.M.A.N.] [PATCH 04/10] batman-adv: Rm empty line from is_my_mac() in main.c Marek Lindner
2012-02-17  7:18 ` [B.A.T.M.A.N.] [PATCH 05/10] batman-adv: Move is_out_of_time() to main.h for general use Marek Lindner
2012-02-17  7:18 ` Marek Lindner [this message]
2012-02-17  7:18 ` [B.A.T.M.A.N.] [PATCH 07/10] batman-adv: add infrastructure to change routing algorithm at runtime Marek Lindner
2012-02-17  7:18 ` [B.A.T.M.A.N.] [PATCH 08/10] batman-adv: convert batman iv algorithm to use dynamic infrastructure Marek Lindner
2012-02-17  7:18 ` [B.A.T.M.A.N.] [PATCH 09/10] batman-adv: allowing changing the routing algorithm via module parameter Marek Lindner
2012-02-17  7:18 ` [B.A.T.M.A.N.] [PATCH 10/10] batman-adv: export used routing algorithm via sysfs Marek Lindner
2012-02-17 20:23 ` [B.A.T.M.A.N.] pull request: batman-adv 2012-02-17 David Miller
2012-02-17 20:44   ` Sven Eckelmann
2012-02-17 20:50     ` David Miller
2012-02-17 21:01       ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1329463110-856-7-git-send-email-lindner_marek@yahoo.de \
    --to=lindner_marek@yahoo.de \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).