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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240118005201.zxpk3r4agkl7y7yi@skbuf>
Date: Thu, 18 Jan 2024 02:52:01 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: Simon Waterer <simon.waterer@...il.com>,
	Arun Ramadoss <arun.ramadoss@...rochip.com>,
	Andrew Lunn <andrew@...n.ch>, netdev@...r.kernel.org
Subject: Re: DSA switch: VLAN tag not added on packets directed to a
 PVID,untagged switchport

On Tue, Jan 16, 2024 at 10:23:30AM -0800, Florian Fainelli wrote:
> Since the proposed changes were not in an unified diff format, it was not
> clear to me what was being proposed, but what you are suggesting is that the
> following should be applied to b53?
> 
> diff --git a/drivers/net/dsa/b53/b53_common.c
> b/drivers/net/dsa/b53/b53_common.c
> index 0d628b35fd5c..354dcfd23da8 100644
> --- a/drivers/net/dsa/b53/b53_common.c
> +++ b/drivers/net/dsa/b53/b53_common.c
> @@ -1556,9 +1556,6 @@ int b53_vlan_del(struct dsa_switch *ds, int port,
>         if (pvid == vlan->vid)
>                 pvid = b53_default_pvid(dev);
> 
> -       if (untagged && !b53_vlan_port_needs_forced_tagged(ds, port))
> -               vl->untag &= ~(BIT(port));
> -
>         b53_set_vlan_entry(dev, vlan->vid, vl);
>         b53_fast_age_vlan(dev, vlan->vid);
> 
> 
> or did I completely miss what was being changed?
> -- 
> Florian
> 

Yes, I had this patch, notice how the entire 'untagged' variable
disappears too.

>From 67ae82a8ba11ebc992ed8450d9ded3f39700b341 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <vladimir.oltean@....com>
Date: Tue, 16 Jan 2024 18:58:40 +0200
Subject: [PATCH] net: dsa: b53: remove use of vlan->flags in port_vlan_del()

The flags are always set to zero by the function callers, i.e.
br_switchdev_port_vlan_del() and dsa_user_vlan_rx_kill_vid().

This makes the vlan->flags handling in driver implementations
practically dead code.

Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
---
 drivers/net/dsa/b53/b53_common.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 0d628b35fd5c..3b071ef2d836 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -1541,7 +1541,6 @@ int b53_vlan_del(struct dsa_switch *ds, int port,
 		 const struct switchdev_obj_port_vlan *vlan)
 {
 	struct b53_device *dev = ds->priv;
-	bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED;
 	struct b53_vlan *vl;
 	u16 pvid;
 
@@ -1556,9 +1555,6 @@ int b53_vlan_del(struct dsa_switch *ds, int port,
 	if (pvid == vlan->vid)
 		pvid = b53_default_pvid(dev);
 
-	if (untagged && !b53_vlan_port_needs_forced_tagged(ds, port))
-		vl->untag &= ~(BIT(port));
-
 	b53_set_vlan_entry(dev, vlan->vid, vl);
 	b53_fast_age_vlan(dev, vlan->vid);
 
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ