Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SWSS:portsorch] missing child_ports checking in addLagMember and removeLagMember when setting interface strip tag #3308

Open
baorliu opened this issue Sep 30, 2024 · 0 comments

Comments

@baorliu
Copy link
Contributor

baorliu commented Sep 30, 2024

in addLagMember and removeLagMember, it needs to check if the interface has child port, besides current checking on lag.m_bridge_port_id.

The issue is seen when a LAG member is added after sub interface creating, the interface strip tag is not set as expected.
cause the member is not working for packet with vlan_id.

I will create a PR to fix it.

@@ -7031,12 +7035,15 @@ bool PortsOrch::addLagMember(Port &lag, Port &port, string member_status)
 
     m_portList[lag.m_alias] = lag;
 
-    if (lag.m_bridge_port_id > 0)
+    if ((lag.m_bridge_port_id > 0)||(!lag.m_child_ports.empty())) 
     {

@@ -7079,7 +7086,8 @@ bool PortsOrch::removeLagMember(Port &lag, Port &port)
     lag.m_members.erase(port.m_alias);
     m_portList[lag.m_alias] = lag;
 
-    if (lag.m_bridge_port_id > 0)
+    if ((lag.m_bridge_port_id > 0)||(!lag.m_child_ports.empty()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant