From aad4054439d9d8ea6e3de1de6db83b6843b4e8a3 Mon Sep 17 00:00:00 2001 From: iris_hsu Date: Thu, 22 Jul 2021 17:13:19 +0800 Subject: [PATCH] Add router interface should remove vlan/lag member first. --- orchagent/intfsorch.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/orchagent/intfsorch.cpp b/orchagent/intfsorch.cpp index b270a0c5e5..6dcb0d764b 100644 --- a/orchagent/intfsorch.cpp +++ b/orchagent/intfsorch.cpp @@ -1043,6 +1043,18 @@ bool IntfsOrch::addRouterIntfs(sai_object_id_t vrf_id, Port &port) return true; } + if (port.m_lag_member_id) + { + SWSS_LOG_WARN("It's portchannel member %s", port.m_alias.c_str()); + return false; + } + + if (!port.m_vlan_members.empty()) + { + SWSS_LOG_WARN("It's vlan member %s", port.m_alias.c_str()); + return false; + } + /* Create router interface if the router interface doesn't exist */ sai_attribute_t attr; vector attrs;