Skip to content

Commit e41b2ee

Browse files
committed
[MCLAG L2 Scenario] Interface Mac address update fails. system mac of active dut is not same as standby sonic-net#19618
Signed-off-by: VladimirKuk <[email protected]>
1 parent 0213180 commit e41b2ee

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

src/iccpd/src/iccp_netlink.c

+4-18
Original file line numberDiff line numberDiff line change
@@ -2309,27 +2309,13 @@ void update_vlan_if_mac_on_standby(struct LocalInterface* lif_vlan, int dir)
23092309

23102310
memset(macaddr, 0, 64);
23112311
memset(system_mac, 0, ETHER_ADDR_LEN);
2312-
if (lif_vlan->is_l3_proto_enabled == false)
2313-
{
2314-
if (memcmp(MLACP(csm).remote_system.system_id, null_mac, ETHER_ADDR_LEN) == 0) {
2315-
ICCPD_LOG_DEBUG(__FUNCTION__, " remote system_id not initialised.");
2316-
return;
2317-
}
2318-
memcpy(system_mac, MLACP(csm).remote_system.system_id, ETHER_ADDR_LEN);
2319-
SET_MAC_STR(macaddr, MLACP(csm).remote_system.system_id);
2320-
} else {
2321-
if (memcmp(MLACP(csm).system_id, null_mac, ETHER_ADDR_LEN) == 0){
2322-
ICCPD_LOG_NOTICE(__FUNCTION__, " system_id not initialised.");
2323-
return;
2324-
}
2325-
memcpy(system_mac, MLACP(csm).system_id, ETHER_ADDR_LEN);
2326-
SET_MAC_STR(macaddr, MLACP(csm).system_id);
2327-
}
23282312

2329-
if (memcmp(system_mac, null_mac, ETHER_ADDR_LEN) == 0) {
2330-
ICCPD_LOG_NOTICE(__FUNCTION__, " system_id not present.");
2313+
if (memcmp(MLACP(csm).remote_system.system_id, null_mac, ETHER_ADDR_LEN) == 0) {
2314+
ICCPD_LOG_DEBUG(__FUNCTION__, " remote system_id not initialised.");
23312315
return;
23322316
}
2317+
memcpy(system_mac, MLACP(csm).remote_system.system_id, ETHER_ADDR_LEN);
2318+
SET_MAC_STR(macaddr, MLACP(csm).remote_system.system_id);
23332319

23342320
ICCPD_LOG_DEBUG(__FUNCTION__,
23352321
"%s Change the system-id of %s from [%02X:%02X:%02X:%02X:%02X:%02X] to [%02X:%02X:%02X:%02X:%02X:%02X], dir %d",

0 commit comments

Comments
 (0)