[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1344bd99-cc38-2dda-4875-337796892685@cumulusnetworks.com>
Date: Tue, 30 Aug 2016 17:00:41 +0200
From: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev@...r.kernel.org, roopa@...ulusnetworks.com,
sashok@...ulusnetworks.com, bridge@...ts.linux-foundation.org,
davem@...emloft.net
Subject: Re: [PATCH net-next 1/2] net: bridge: change unicast boolean to exact
pkt_type
On 30/08/16 16:59, Stephen Hemminger wrote:
> On Tue, 30 Aug 2016 15:08:58 +0200
> Nikolay Aleksandrov <nikolay@...ulusnetworks.com> wrote:
>
>> - if (!is_broadcast_ether_addr(dest) && is_multicast_ether_addr(dest) &&
>> - br_multicast_rcv(br, p, skb, vid))
>> - goto drop;
>> + local_rcv = !!(br->dev->flags & IFF_PROMISC);
> local_rcv is needlessly initialized in existing code. Pls remove that.
>
Please check again, I did remove it in this patch.
>> + if (is_multicast_ether_addr(dest)) {
>> + /* by definition the broadcast is also a multicast address */
>> + if (is_broadcast_ether_addr(dest)) {
>> + pkt_type = BR_PKT_BROADCAST;
>> + local_rcv = true;
>> + } else {
>> + pkt_type = BR_PKT_MULTICAST;
>> + if (br_multicast_rcv(br, p, skb, vid))
>> + goto drop;
>> + }
>> + }
>>
>
>
> These could go after the BR_STATE_LEARNING check
They can't because of br_multicast_rcv().
>
>> if (p->state == BR_STATE_LEARNING)
>> goto drop;
>>
>> BR_INPUT_SKB_CB(skb)->brdev = br->dev;
>>
>> - local_rcv = !!(br->dev->flags & IFF_PROMISC);
>> -
>> if (IS_ENABLED(CONFIG_INET) && skb->protocol == htons(ETH_P_ARP))
>> br_do_proxy_arp(skb, br, vid, p);
>>
>
> can't proxy_arp change what was a broadcast packet into a unicast packet?
>
Powered by blists - more mailing lists