From: Stephen Hemminger <stephen@networkplumber.org>
To: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Cc: netdev@vger.kernel.org, roopa@cumulusnetworks.com,
davem@davemloft.net, bridge@lists.linux-foundation.org
Subject: Re: [Bridge] [PATCH net-next 1/2] net: bridge: change unicast boolean to exact pkt_type
Date: Tue, 30 Aug 2016 07:59:53 -0700 [thread overview]
Message-ID: <20160830075953.739291e1@xeon-e3> (raw)
In-Reply-To: <1472562539-23247-2-git-send-email-nikolay@cumulusnetworks.com>
On Tue, 30 Aug 2016 15:08:58 +0200
Nikolay Aleksandrov <nikolay@cumulusnetworks.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?
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Hemminger <stephen@networkplumber.org>
To: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Cc: netdev@vger.kernel.org, roopa@cumulusnetworks.com,
davem@davemloft.net, bridge@lists.linux-foundation.org
Subject: Re: [PATCH net-next 1/2] net: bridge: change unicast boolean to exact pkt_type
Date: Tue, 30 Aug 2016 07:59:53 -0700 [thread overview]
Message-ID: <20160830075953.739291e1@xeon-e3> (raw)
In-Reply-To: <1472562539-23247-2-git-send-email-nikolay@cumulusnetworks.com>
On Tue, 30 Aug 2016 15:08:58 +0200
Nikolay Aleksandrov <nikolay@cumulusnetworks.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?
next prev parent reply other threads:[~2016-08-30 14:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-30 13:08 [Bridge] [PATCH net-next 0/2] net: bridge: add per-port unknown multicast flood control Nikolay Aleksandrov
2016-08-30 13:08 ` Nikolay Aleksandrov via Bridge
2016-08-30 13:08 ` [Bridge] [PATCH net-next 1/2] net: bridge: change unicast boolean to exact pkt_type Nikolay Aleksandrov
2016-08-30 13:08 ` Nikolay Aleksandrov
2016-08-30 14:56 ` [Bridge] " Stephen Hemminger
2016-08-30 14:56 ` Stephen Hemminger
2016-08-30 14:57 ` [Bridge] " Nikolay Aleksandrov
2016-08-30 14:57 ` Nikolay Aleksandrov via Bridge
2016-08-30 14:59 ` Stephen Hemminger [this message]
2016-08-30 14:59 ` Stephen Hemminger
2016-08-30 15:00 ` [Bridge] " Nikolay Aleksandrov
2016-08-30 15:00 ` Nikolay Aleksandrov
2016-08-30 15:10 ` [Bridge] " Nikolay Aleksandrov
2016-08-30 15:10 ` Nikolay Aleksandrov via Bridge
2016-08-30 13:08 ` [Bridge] [PATCH net-next 2/2] net: bridge: add per-port multicast flood flag Nikolay Aleksandrov
2016-08-30 13:08 ` Nikolay Aleksandrov
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=20160830075953.739291e1@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=roopa@cumulusnetworks.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.