]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: fix problem with bypass getting set accidentally on all ESs
authorAnuradha Karuppiah <anuradhak@nvidia.com>
Fri, 19 Feb 2021 01:49:20 +0000 (17:49 -0800)
committerAnuradha Karuppiah <anuradhak@nvidia.com>
Wed, 24 Feb 2021 16:11:26 +0000 (08:11 -0800)
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 <anuradhak@nvidia.com>
zebra/if_netlink.c

index 61a1807fc9adc71f3ec4ab02d77a56f5bed89e9b..98bde4b3c05640545672ef8a551db0c9a3e8abdf 100644 (file)
@@ -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])