From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Joe Perches <joe@perches.com>
Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
Florian Westphal <fw@strlen.de>,
Stephen Hemminger <stephen@networkplumber.org>,
"David S. Miller" <davem@davemloft.net>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
bridge@lists.linux-foundation.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 04/12] bridge: netfilter: Use the new global ether_<foo>_addr arrays
Date: Sat, 31 Mar 2018 20:28:10 +0200 [thread overview]
Message-ID: <20180331182810.or7attmfpjxw4sfm@salvia> (raw)
In-Reply-To: <df70bafdca663db034626f4f1525826ea263bf2c.1522479607.git.joe@perches.com>
Hi Joe,
On Sat, Mar 31, 2018 at 12:05:19AM -0700, Joe Perches wrote:
> Remove the local consts and use the new globals.
This one is already upstream:
https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git/commit/?id=9124a20d8794663a396b5d6f91f66903848a042b
I can see you're using is_broadcast_ether_addr(e->destmsk) in this new
version, we would need an incremental version.
Thanks.
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> net/bridge/netfilter/ebt_stp.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/net/bridge/netfilter/ebt_stp.c b/net/bridge/netfilter/ebt_stp.c
> index 3140eb912d7e..2b7479cc0140 100644
> --- a/net/bridge/netfilter/ebt_stp.c
> +++ b/net/bridge/netfilter/ebt_stp.c
> @@ -153,8 +153,6 @@ ebt_stp_mt(const struct sk_buff *skb, struct xt_action_param *par)
> static int ebt_stp_mt_check(const struct xt_mtchk_param *par)
> {
> const struct ebt_stp_info *info = par->matchinfo;
> - const u8 bridge_ula[6] = {0x01, 0x80, 0xc2, 0x00, 0x00, 0x00};
> - const u8 msk[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
> const struct ebt_entry *e = par->entryinfo;
>
> if (info->bitmask & ~EBT_STP_MASK || info->invflags & ~EBT_STP_MASK ||
> @@ -162,8 +160,8 @@ static int ebt_stp_mt_check(const struct xt_mtchk_param *par)
> return -EINVAL;
> /* Make sure the match only receives stp frames */
> if (!par->nft_compat &&
> - (!ether_addr_equal(e->destmac, bridge_ula) ||
> - !ether_addr_equal(e->destmsk, msk) ||
> + (!ether_addr_equal(e->destmac, ether_stp_addr) ||
> + !ether_addr_equal(e->destmsk, ether_broadcast_addr) ||
> !(e->bitmask & EBT_DESTMAC)))
> return -EINVAL;
>
> --
> 2.15.0
>
next prev parent reply other threads:[~2018-03-31 18:28 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-31 7:05 [PATCH 00/12] Ethernet: Add and use ether_<type>_addr globals Joe Perches
2018-03-31 7:05 ` [PATCH 01/12] ethernet: Add generic ether_<foo>_addr addresses Joe Perches
2018-03-31 7:05 ` [PATCH 02/12] treewide/net: Rename eth_stp_addr to ether_stp_addr Joe Perches
2018-03-31 17:36 ` Andrew Lunn
2018-03-31 18:01 ` Joe Perches
2018-03-31 18:34 ` [PATCH V2] " Joe Perches
2018-04-01 18:07 ` David Miller
2018-04-01 0:18 ` [PATCH 02/12] " kbuild test robot
2018-03-31 7:05 ` [PATCH 03/12] net: mac80211: Use global ether_broadcast_addr Joe Perches
2018-03-31 7:05 ` [PATCH 04/12] bridge: netfilter: Use the new global ether_<foo>_addr arrays Joe Perches
2018-03-31 18:28 ` Pablo Neira Ayuso [this message]
2018-03-31 18:40 ` Joe Perches
2018-03-31 7:05 ` [PATCH 05/12] net: atm: Use ether_broadcast_addr Joe Perches
2018-03-31 7:05 ` [PATCH 06/12] wireless: Convert simple uses of a static const Ethernet broadcast address Joe Perches
[not found] ` <79196f134a513d50968e8e208a0e56b3c0236ee3.1522479607.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2018-03-31 14:01 ` Pkshih
2018-03-31 14:33 ` Joe Perches
2018-04-05 12:39 ` Kalle Valo
2018-04-05 12:48 ` Kalle Valo
2018-03-31 7:05 ` [PATCH 07/12] brcmfmac: Convert ALLFFMAC to ether_broadcast_addr Joe Perches
2018-04-05 19:00 ` Arend van Spriel
2018-03-31 7:05 ` [PATCH 08/12] iwlegacy: Remove EXPORT_SYMBOL(il_bcast_addr) and use ether_broadcast_addr Joe Perches
2018-03-31 7:05 ` [PATCH 09/12] iwlwifi: Remove local iwl_bcast_addr " Joe Perches
2018-07-07 7:40 ` Luciano Coelho
2018-09-07 10:46 ` Luciano Coelho
2018-03-31 7:05 ` [PATCH 10/12] mvpp2: Use ether_broadcast_addr instead of a local array Joe Perches
2018-03-31 7:05 ` [PATCH 11/12] qlogic: Convert local bcast_addr to global ether_broadcast_addr Joe Perches
2018-03-31 7:05 ` [PATCH 12/12] ethernet: Use ether_zero_addr instead of local statics Joe Perches
2018-04-05 13:27 ` [PATCH 00/12] Ethernet: Add and use ether_<type>_addr globals Felix Fietkau
2018-04-05 13:51 ` Joe Perches
2018-04-05 14:05 ` Felix Fietkau
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=20180331182810.or7attmfpjxw4sfm@salvia \
--to=pablo@netfilter.org \
--cc=bridge@lists.linux-foundation.org \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=fw@strlen.de \
--cc=joe@perches.com \
--cc=kadlec@blackhole.kfki.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=stephen@networkplumber.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