From 3f589fa8ecd0eafadef6938637aa8f442702ae91 Mon Sep 17 00:00:00 2001 From: Anuradha Karuppiah Date: Thu, 18 Feb 2021 17:49:20 -0800 Subject: [PATCH] zebra: fix problem with bypass getting set accidentally on all ESs This was caused because of uninitialized netlint attrs in the bond-member netlink parse API. PS: It was caught by the upstream topotests on ARM8 (passed everywhere else). Signed-off-by: Anuradha Karuppiah --- zebra/if_netlink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c index 61a1807fc9..98bde4b3c0 100644 --- a/zebra/if_netlink.c +++ b/zebra/if_netlink.c @@ -724,6 +724,7 @@ static uint8_t netlink_parse_lacp_bypass(struct rtattr **linkinfo) uint8_t bypass = 0; struct rtattr *mbrinfo[IFLA_BOND_SLAVE_MAX + 1]; + memset(mbrinfo, 0, sizeof(mbrinfo)); parse_rtattr_nested(mbrinfo, IFLA_BOND_SLAVE_MAX, linkinfo[IFLA_INFO_SLAVE_DATA]); if (mbrinfo[IFLA_BOND_SLAVE_AD_RX_BYPASS]) -- 2.39.5