netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] tap: Mark devices of type "tun" as IFF_DONT_BRIDGE
@ 2014-06-04 18:06 Vlad Yasevich
  2014-06-04 18:54 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Vlad Yasevich @ 2014-06-04 18:06 UTC (permalink / raw)
  To: netdev; +Cc: Vlad Yasevich

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-04 19:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-04 18:06 [PATCH net] tap: Mark devices of type "tun" as IFF_DONT_BRIDGE Vlad Yasevich
2014-06-04 18:54 ` Stephen Hemminger
2014-06-04 19:40   ` Vlad Yasevich

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).