Received: by 10.213.65.68 with SMTP id h4csp849494imn; Sat, 31 Mar 2018 11:29:41 -0700 (PDT) X-Google-Smtp-Source: AIpwx49fUdp/Sb0JlViyc2bY7g2btUqtrSsi+yMvDW6pWB0oasjGlzDXi14dSNDOi66bGplOURb2 X-Received: by 10.99.110.5 with SMTP id j5mr2459101pgc.246.1522520981807; Sat, 31 Mar 2018 11:29:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522520981; cv=none; d=google.com; s=arc-20160816; b=xeGm2Ox8CaDsNeufUAJM/0SrJJkFw2n5F/QyRcXV15ChqEp79kzOHA+WlwikGi4S9T pgcx0LxYOvKffmKUI8AKeFrLl87VjGh8Vph8nfP+OxpWhw4V6Fv8tZtiZ6/gTA3WSkeW b+wENQ9dMenIfy+5sE/eSYDYkj7Wzhe52jthKIUzgfpc4wIg9uJal7RuDIJ+V/QBF7oZ D+BmdOUSs0OK/+3ZeEOSrTbk03fJz10j8j4bXJp/HRr/fYflVHlV3V3K/W1dEnmj6awo 6M6jCC2wZQOk98wpWa1UTvnzrw1vcnGh37v7A1071sOsus9Bv5VXqiLVHlIEmIt7+k8s TOrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=FTrlMpeAjri2OkQklX/yQwBaG6clCcMLX6Aw46mofqg=; b=09R8EIDUSf6nFrz9KbedgYQ5Aso6SLPRjbfEtmgrgnCyuxjodpH/FvXeLdBB2JY4bR oXYfBL53dmvsV9Nl8tjq0tQpLC7cqP0qeIg+2leLOl5Azlls5DVMe+paD9iv7fsTCUXB 2p/3oKcnSV7wGveZW6dc4+xL7yEmtoOnCQSvgW6TbN1qdCARhdU0Cql2kSsusm8QdAfj /5jKe6eIYopAMHRd5t/Kc+dTy020ojExEfI/a3b0Hkcwiu2t/IKoCtUsGLTmTrQVCj+A Hm97Rm/Iq/ZQtmQJfcpEEnzT3vCyvnDph8/N3njaoSFdbl0VZn9qszqpFG2aefZUr9qb nJqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y65si7402861pgb.588.2018.03.31.11.29.25; Sat, 31 Mar 2018 11:29:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753266AbeCaS2R (ORCPT + 99 others); Sat, 31 Mar 2018 14:28:17 -0400 Received: from mail.us.es ([193.147.175.20]:49260 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753017AbeCaS2P (ORCPT ); Sat, 31 Mar 2018 14:28:15 -0400 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id 8CE4C10FB13 for ; Sat, 31 Mar 2018 20:27:54 +0200 (CEST) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 7937EDA788 for ; Sat, 31 Mar 2018 20:27:54 +0200 (CEST) Received: by antivirus1-rhel7.int (Postfix, from userid 99) id 6DC34DA2CE; Sat, 31 Mar 2018 20:27:54 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on antivirus1-rhel7.int X-Spam-Level: X-Spam-Status: No, score=-108.0 required=7.5 tests=ALL_TRUSTED,BAYES_50, HEADER_FROM_DIFFERENT_DOMAINS,SMTPAUTH_US2,USER_IN_WHITELIST autolearn=disabled version=3.4.1 Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 2AE74DA3AC; Sat, 31 Mar 2018 20:27:52 +0200 (CEST) Received: from 192.168.1.97 (192.168.1.97) by antivirus1-rhel7.int (F-Secure/fsigk_smtp/550/antivirus1-rhel7.int); Sat, 31 Mar 2018 20:27:52 +0200 (CEST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/antivirus1-rhel7.int) Received: from us.es (sys.soleta.eu [212.170.55.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: 1984lsi) by entrada.int (Postfix) with ESMTPSA id E4EE04265A2F; Sat, 31 Mar 2018 20:27:51 +0200 (CEST) Date: Sat, 31 Mar 2018 20:28:10 +0200 X-SMTPAUTHUS: auth mail.us.es From: Pablo Neira Ayuso To: Joe Perches Cc: Jozsef Kadlecsik , Florian Westphal , Stephen Hemminger , "David S. Miller" , 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__addr arrays Message-ID: <20180331182810.or7attmfpjxw4sfm@salvia> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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 >