From: Veaceslav Falico <vfalico@gmail.com>
To: lichunhe@huawei.com
Cc: j.vosburgh@gmail.com, andy@greyhouse.net,
linux-kernel@vger.kernel.org, dingtianhong@huawei.com,
qianhuibin@huawei.com
Subject: Re: [PATCH net/net-next] bonding:Don't received packets if bonding is not up
Date: Mon, 4 Aug 2014 08:13:23 +0200 [thread overview]
Message-ID: <20140804061322.GA9348@mikrodark.usersys.redhat.com> (raw)
In-Reply-To: <1407122113-3184-1-git-send-email-lichunhe@huawei.com>
On Mon, Aug 04, 2014 at 11:15:13AM +0800, lichunhe@huawei.com wrote:
>From: Chunhe Li <lichunhe@huawei.com>
>
>If the bonding device is down, it should not receive packets
>to network stack or other upper flow stack.
This breaks arp monitoring and 802.3ad modes, as they won't ever come up.
Also, please cc netdev next times.
>
>Signed-off-by: Chunhe Li <lichunhe@huawei.com>
>---
> drivers/net/bonding/bond_main.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
>diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>index 701f86c..48a127b 100644
>--- a/drivers/net/bonding/bond_main.c
>+++ b/drivers/net/bonding/bond_main.c
>@@ -1110,6 +1110,12 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb)
> int (*recv_probe)(const struct sk_buff *, struct bonding *,
> struct slave *);
> int ret = RX_HANDLER_ANOTHER;
>+
>+ slave = bond_slave_get_rcu(skb->dev);
>+ bond = slave->bond;
>+
>+ if (unlikely(!(bond->dev->flags & IFF_UP)))
>+ return RX_HANDLER_PASS;
>
> skb = skb_share_check(skb, GFP_ATOMIC);
> if (unlikely(!skb))
>@@ -1117,9 +1123,6 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb)
>
> *pskb = skb;
>
>- slave = bond_slave_get_rcu(skb->dev);
>- bond = slave->bond;
>-
> recv_probe = ACCESS_ONCE(bond->recv_probe);
> if (recv_probe) {
> ret = recv_probe(skb, bond, slave);
>--
>1.9.2.0
>
>
prev parent reply other threads:[~2014-08-04 6:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-04 3:15 [PATCH net/net-next] bonding:Don't received packets if bonding is not up lichunhe
2014-08-04 6:13 ` Veaceslav Falico [this message]
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=20140804061322.GA9348@mikrodark.usersys.redhat.com \
--to=vfalico@gmail.com \
--cc=andy@greyhouse.net \
--cc=dingtianhong@huawei.com \
--cc=j.vosburgh@gmail.com \
--cc=lichunhe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=qianhuibin@huawei.com \
/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).