netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vlad Yasevich <vyasevic@redhat.com>
To: netdev@vger.kernel.org
Cc: Vlad Yasevich <vyasevic@redhat.com>
Subject: [PATCH net] tap: Mark devices of type "tun" as IFF_DONT_BRIDGE
Date: Wed,  4 Jun 2014 14:06:08 -0400	[thread overview]
Message-ID: <1401905168-21559-1-git-send-email-vyasevic@redhat.com> (raw)

Tun devices are layer 3 devices and do not work correctly
when bridged.  Mark then as IFF_DONT_BRIDGE so that people
trying to bridge will get an error.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
---
 drivers/net/tun.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index ee328ba..0161aa3 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -931,6 +931,7 @@ static void tun_net_init(struct net_device *dev)
 		/* Zero header length */
 		dev->type = ARPHRD_NONE;
 		dev->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST;
+		dev->priv_flags |= IFF_DONT_BRIDGE;
 		dev->tx_queue_len = TUN_READQ_SIZE;  /* We prefer our own queue length */
 		break;
 
-- 
1.9.0

             reply	other threads:[~2014-06-04 18:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-04 18:06 Vlad Yasevich [this message]
2014-06-04 18:54 ` [PATCH net] tap: Mark devices of type "tun" as IFF_DONT_BRIDGE Stephen Hemminger
2014-06-04 19:40   ` Vlad Yasevich

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=1401905168-21559-1-git-send-email-vyasevic@redhat.com \
    --to=vyasevic@redhat.com \
    --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).