>From e03af5263bcaeea15442601e2a9f65c6b582352b Mon Sep 17 00:00:00 2001 From: Zhu Yanjun Date: Mon, 16 Feb 2015 12:45:36 +0800 Subject: [PATCH 1/1] bridge: turn off carrier when the bridge is created When a bridge interface is created, there is no any sub interface in it. In this case, the packets should not go to this bridge interface. As such, carrier is turned off. Suggested-by: Stephen Hemminger Signed-off-by: Zhu Yanjun --- net/bridge/br_device.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index ffd379d..2d60474 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c @@ -394,4 +394,9 @@ void br_dev_setup(struct net_device *dev) br_netfilter_rtable_init(br); br_stp_timer_init(br); br_multicast_init(br); + + /* Shutdown bridge to avoid packets */ + if (netif_carrier_ok(dev)) { + netif_carrier_off(dev); + } } -- 1.9.1