lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fad44e54-582d-f39b-0225-ce5fc9fcb983@gmail.com>
Date:   Tue, 15 Aug 2017 10:38:22 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Vivien Didelot <vivien.didelot@...oirfairelinux.com>,
        netdev@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, kernel@...oirfairelinux.com,
        "David S. Miller" <davem@...emloft.net>,
        Andrew Lunn <andrew@...n.ch>,
        Egil Hjelmeland <privat@...l-hjelmeland.no>,
        John Crispin <john@...ozen.org>,
        Woojung Huh <Woojung.Huh@...rochip.com>,
        Sean Wang <sean.wang@...iatek.com>,
        Volodymyr Bendiuga <volodymyr.bendiuga@...il.com>,
        Nikita Yushchenko <nikita.yoush@...entembedded.com>,
        Maxime Hadjinlian <maxime@...ialet.com>,
        Chris Healy <cphealy@...il.com>,
        Maxim Uvarov <muvarov@...il.com>,
        Stefan Eichenberger <eichest@...il.com>,
        Jason Cobham <jcobham@...stertangent.com>,
        Juergen Borleis <jbe@...gutronix.de>,
        Tobias Waldekranz <tobias@...dekranz.com>
Subject: Re: [PATCH net-next 08/11] net: dsa: restore mdb dump



On 08/14/2017 03:22 PM, Vivien Didelot wrote:
> The same dsa_fdb_dump_cb_t callback is used since there is no
> distinction to do between FDB and MDB entries at this layer.
> 
> Implement mv88e6xxx_port_mdb_dump so that multicast addresses associated
> to a switch port can be dumped.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
> ---
>  drivers/net/dsa/mv88e6xxx/chip.c | 33 +++++++++++++++++++++++++--------
>  include/net/dsa.h                |  3 +++
>  2 files changed, 28 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
> index 918d8f0fe091..2ad32734b6f6 100644
> --- a/drivers/net/dsa/mv88e6xxx/chip.c
> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
> @@ -1380,7 +1380,7 @@ static int mv88e6xxx_port_fdb_del(struct dsa_switch *ds, int port,
>  }
>  
>  static int mv88e6xxx_port_db_dump_fid(struct mv88e6xxx_chip *chip,
> -				      u16 fid, u16 vid, int port,
> +				      u16 fid, u16 vid, int port, bool mc,
>  				      dsa_fdb_dump_cb_t *cb, void *data)
>  {
>  	struct mv88e6xxx_atu_entry addr;
> @@ -1401,11 +1401,14 @@ static int mv88e6xxx_port_db_dump_fid(struct mv88e6xxx_chip *chip,
>  		if (addr.trunk || (addr.portvec & BIT(port)) == 0)
>  			continue;
>  
> -		if (!is_unicast_ether_addr(addr.mac))
> +		if ((is_unicast_ether_addr(addr.mac) && mc) ||

Should not this remain:

		if (!is_unicast_ether_addr(addr.mac) && mc) ||
		    (is_multicast_ether_addr(addr.mac) && !mc)

here, being:

- if this is an *not* an unicast address and MC dump is requested or
- if this is a multicast address and MC dump is not requested


-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ