From: "Nicolas de Pesloüan" <nicolas.2p.debian@gmail.com>
To: Andy Gospodarek <andy@greyhouse.net>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
Herbert Xu <herbert@gondor.hengli.com.au>,
Jay Vosburgh <fubar@us.ibm.com>, Jiri Pirko <jpirko@redhat.com>
Subject: Re: [PATCH net-2.6] bonding: drop frames received with master's source MAC
Date: Sat, 26 Feb 2011 00:08:03 +0100 [thread overview]
Message-ID: <4D683653.4050409@gmail.com> (raw)
In-Reply-To: <20110225222455.GI11864@gospo.rdu.redhat.com>
Le 25/02/2011 23:24, Andy Gospodarek a écrit :
> On Fri, Feb 25, 2011 at 11:04:27PM +0100, Nicolas de Pesloüan wrote:
>> Le 25/02/2011 22:13, Andy Gospodarek a écrit :
>>> I was looking at my system and wondering why I sometimes saw these
>>> DAD messages in my logs:
>>>
>>> bond0: IPv6 duplicate address fe80::21b:21ff:fe38:2ec4 detected!
>>>
>>> I traced it back and realized the IPv6 Neighbor Solicitations I was
>>> sending were also coming back into the stack on the slave(s) that did
>>> not transmit the frames. I could not think of a compelling reason to
>>> notify the user that a NS we sent came back, so I set out to just drop
>>> the frame silently in ndisc_recv_ns drop.
>>>
>>> That seemed to work well, but when I thought about it I could not
>>> compelling reason to save any of these frames. Dropping them as soon as
>>> we get them seems like a much better idea as it fixes other issues that
>>> may exist for more than just IPv6 DAD.
>>>
>>> I chose to check the incoming frame against the master's MAC address as
>>> that should be the MAC address used anytime a broadcast frame is sent by
>>> the bonding driver that had the chance to make its way back into one of
>>> the other devices.
>>
>> I think this could break the ARP monitoring. ARP monitoring rely on a
>> normal protocol handler, registered in bond_main.c.
>>
>> void bond_register_arp(struct bonding *bond)
>> {
>> struct packet_type *pt =&bond->arp_mon_pt;
>>
>> if (pt->type)
>> return;
>>
>> pt->type = htons(ETH_P_ARP);
>> pt->dev = bond->dev;
>> pt->func = bond_arp_rcv;
>> dev_add_pack(pt);
>> }
>>
>> For as far as I understand, some variants of arp_validate require the
>> backup interfaces to receive ARP requests sent from the master, through
>> the active interface, presumably with the master MAC as the source MAC.
>>
>> As this protocol handler is registered at the master level, the exact
>> match logic in __netif_receive_skb(), which apply at the slave level,
>> shouldn't deliver this skb to bond_arp_rcv().
>>
>> Can someone confirm ? Jay ?
>>
>> Nicolas.
>>
>
> I confirmed your suspicion, this breaks ARP monitoring. I would still
> welcome other opinions though as I think it would be nice to fix this as
> low as possible.
Why do you want to fix it earlier that in ndisc_recv_ns drop? Your original idea of silently
dropping the frame there seems perfect to me.
Nicolas.
next prev parent reply other threads:[~2011-02-25 23:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-25 21:13 [PATCH net-2.6] bonding: drop frames received with master's source MAC Andy Gospodarek
2011-02-25 22:04 ` Nicolas de Pesloüan
2011-02-25 22:24 ` Andy Gospodarek
2011-02-25 23:08 ` Nicolas de Pesloüan [this message]
2011-02-28 16:32 ` Andy Gospodarek
2011-02-28 21:45 ` Nicolas de Pesloüan
2011-03-01 2:35 ` Andy Gospodarek
2011-03-01 5:46 ` Jay Vosburgh
2011-03-01 18:16 ` Andy Gospodarek
2011-03-01 21:30 ` Nicolas de Pesloüan
2011-03-01 22:25 ` Jay Vosburgh
2011-03-01 23:08 ` Nicolas de Pesloüan
[not found] ` <AANLkTi=QTDNBf7Jskj55NP64Os8kgEs1WMpFGHMo+K3B@mail.gmail.com>
2011-03-02 12:30 ` Herbert Xu
2011-03-02 20:30 ` Nicolas de Pesloüan
2011-03-02 20:26 ` Nicolas de Pesloüan
2011-02-25 22:28 ` Jay Vosburgh
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=4D683653.4050409@gmail.com \
--to=nicolas.2p.debian@gmail.com \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=fubar@us.ibm.com \
--cc=herbert@gondor.hengli.com.au \
--cc=jpirko@redhat.com \
--cc=netdev@vger.kernel.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).