[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160830075953.739291e1@xeon-e3>
Date: Tue, 30 Aug 2016 07:59:53 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
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 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.
> + 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
> 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