[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54FFAAF9.3000207@windriver.com>
Date: Wed, 11 Mar 2015 10:39:53 +0800
From: yzhu1 <Yanjun.Zhu@...driver.com>
To: <netdev@...r.kernel.org>, <davem@...hat.com>,
Stephen Hemminger <stephen@...workplumber.org>,
<dsahern@...il.com>
Subject: Re: [PATCH 1/1] bridge: turn off carrier when the bridge is created
Hi, Stephen && David
Any comment?
Best Regards!
Zhu Yanjun
On 03/10/2015 03:09 PM, Zhu Yanjun wrote:
> 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.
>
> CC: David Ahern <dsahern@...il.com>
> Suggested-by: Stephen Hemminger <stephen@...workplumber.org>
> Signed-off-by: Zhu Yanjun <Yanjun.Zhu@...driver.com>
> ---
> net/bridge/br_device.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
> index ffd379d..fcc4794 100644
> --- a/net/bridge/br_device.c
> +++ b/net/bridge/br_device.c
> @@ -394,4 +394,8 @@ 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);
> }
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists