From: yzhu1 <Yanjun.Zhu@windriver.com>
To: <netdev@vger.kernel.org>, <davem@redhat.com>,
Stephen Hemminger <stephen@networkplumber.org>,
<dsahern@gmail.com>
Subject: Re: [PATCH 1/1] bridge: turn off carrier when the bridge is created
Date: Wed, 11 Mar 2015 10:39:53 +0800 [thread overview]
Message-ID: <54FFAAF9.3000207@windriver.com> (raw)
In-Reply-To: <1425971382-14177-2-git-send-email-Yanjun.Zhu@windriver.com>
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@gmail.com>
> Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
> Signed-off-by: Zhu Yanjun <Yanjun.Zhu@windriver.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);
> }
next prev parent reply other threads:[~2015-03-11 2:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-10 7:09 [PATCH 0/1] bridge: turn off carrier when the bridge is created Zhu Yanjun
2015-03-10 7:09 ` [PATCH 1/1] " Zhu Yanjun
2015-03-11 2:39 ` yzhu1 [this message]
2015-03-11 4:03 ` David Miller
2015-03-11 5:26 ` Stephen Hemminger
2015-03-11 5:29 ` David Miller
2015-03-11 6:16 ` yzhu1
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=54FFAAF9.3000207@windriver.com \
--to=yanjun.zhu@windriver.com \
--cc=davem@redhat.com \
--cc=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.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).