Skip to content

Commit 2b6997c

Browse files
Denys HaryachyyShuotian Cheng
Denys Haryachyy
authored and
Shuotian Cheng
committed
swss/orchagent : Fixed the case of removing ip address from the interface.
1. Incorrect ip prefix parsing is fixed. 2. IntfsTable map is updated after removal of ip address from the interface. Signed-off-by: Denys Haryachyy <[email protected]>
1 parent 46f33d3 commit 2b6997c

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

orchagent/intfsorch.cpp

+4-10
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,6 @@ void IntfsOrch::doTask()
123123
continue;
124124
}
125125

126-
IpPrefix ip_prefix;
127-
for (auto it = kfvFieldsValues(t).begin();
128-
it != kfvFieldsValues(t).end(); it++)
129-
{
130-
if (fvField(*it) == "ip_prefix")
131-
{
132-
ip_prefix = IpPrefix(fvValue(*it));
133-
}
134-
}
135-
136126
sai_unicast_route_entry_t unicast_route_entry;
137127
unicast_route_entry.vr_id = gVirtualRouterId;
138128
unicast_route_entry.destination.addr_family = SAI_IP_ADDR_FAMILY_IPV4;
@@ -159,7 +149,11 @@ void IntfsOrch::doTask()
159149
it++;
160150
}
161151
else
152+
{
153+
SWSS_LOG_NOTICE("Remove packet action trap route ip:%s\n", ip_prefix.getIp().to_string().c_str());
154+
m_intfs.erase(alias);
162155
it = m_toSync.erase(it);
156+
}
163157
}
164158
}
165159
}

0 commit comments

Comments
 (0)