[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110113065855.GU29757@distanz.ch>
Date: Thu, 13 Jan 2011 07:58:55 +0100
From: Tobias Klauser <tklauser@...tanz.ch>
To: David Miller <davem@...emloft.net>
Cc: cmetcalf@...era.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next-2.6] netdev: tilepro: Use
is_multicast_ether_addr helper
On 2011-01-13 at 03:45:01 +0100, David Miller <davem@...emloft.net> wrote:
> From: Chris Metcalf <cmetcalf@...era.com>
> Date: Wed, 12 Jan 2011 12:49:03 -0500
>
> > On 1/12/2011 4:31 AM, Tobias Klauser wrote:
> >> Use is_multicast_ether_addr from linux/etherdevice.h instead of a custom
> >> macro. Also remove the broadcast address check, as it is considered a
> >> multicast address too.
> >>
> >> Signed-off-by: Tobias Klauser <tklauser@...tanz.ch>
> >> ---
> >> drivers/net/tile/tilepro.c | 10 +---------
> >> 1 files changed, 1 insertions(+), 9 deletions(-)
> >
> > Thanks, I've taken this into the Tilera tree!
>
> Don't, his transformation is buggy.
Why?
Doesn't the code want to make sure that only unicast addresses get
filtered?
> You can't get rid of the broadcast check, it needs to be there.
> Think about it.
If a unicast address is in buf, is_multicast_ether_addr returns false
(and is_broadcast_addr would too) and thus it would get filtered.
If a multicast address is in buf, is_multicast_ether_addr returns
true, so the it won't get filtered (no matter what is_broadcast_addr
would tell).
If a broadcast address is in buf, is_multicast_ether_addr returns true,
so it won't get filtered (no matter what is_broadcast_addr would tell).
Are there any special addresses I missed? Or did I didn't get the above
right?
--
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