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-next>] [day] [month] [year] [list]
Date:   Thu, 20 Jul 2017 15:57:28 +0200
From:   Egil Hjelmeland <egil.hjelmeland@...itel.com>
To:     <corbet@....net>, <andrew@...n.ch>,
        <vivien.didelot@...oirfairelinux.com>, <f.fainelli@...il.com>,
        <davem@...emloft.net>, <kernel@...gutronix.de>,
        <linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <netdev@...r.kernel.org>
CC:     <egil.hjelmeland@...itel.com>
Subject: [PATCH 13/13] net: dsa: lan9303: lan9303_port_mdb_del remove port 0

Workaround for dsa_switch_mdb_add adding CPU port to group,
but forgetting to remove it:

Remove port 0 if only port 0 is only port left.

Signed-off-by: Egil Hjelmeland <egil.hjelmeland@...itel.com>
---
 drivers/net/dsa/lan9303-core.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
index 54646eb38185..61c915eed649 100644
--- a/drivers/net/dsa/lan9303-core.c
+++ b/drivers/net/dsa/lan9303-core.c
@@ -1424,6 +1424,17 @@ static int lan9303_port_mdb_del(
 	if (mdb->vid)
 		return -EOPNOTSUPP;
 	lan9303_alr_del_port(chip, mdb->addr, port);
+
+	{
+		/* Workaround for dsa_switch_mdb_add adding CPU port to
+		 * group, but forgetting to remove it. Remove port 0
+		 * if only port left
+		 **/
+		struct lan9303_alr_cache_entry *entr =
+			lan9303_alr_cache_find_mac(chip, mdb->addr);
+		if (entr && (entr->port_map == BIT(0)))
+			lan9303_alr_del_port(chip, mdb->addr, 0);
+	}
 	return 0;
 }
 
-- 
2.11.0


DISCLAIMER:
This e-mail may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply e-mail and delete all copies of this message.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ