Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bond: Fix using uninitialized 'lacp_fallback_ab_cfg' for 'bond-primary'.
's->lacp_fallback_ab_cfg' initialized down below in the code, so we're using it uninitialized to detect if we need to get 'bond-primary' configuration. Found by valgrind: Conditional jump or move depends on uninitialised value(s) at 0x409114: port_configure_bond (bridge.c:4569) by 0x409114: port_configure (bridge.c:1284) by 0x40F6E6: bridge_reconfigure (bridge.c:917) by 0x411425: bridge_run (bridge.c:3330) by 0x406D84: main (ovs-vswitchd.c:127) Uninitialised value was created by a stack allocation at 0x408C53: port_configure (bridge.c:1190) Fix that by moving this code to the point where 'lacp_fallback_ab_cfg' already initialized. Additionally clarified behavior of 'bond-primary' in manpages for the fallback to AB case. Fixes: b4e5021 ("bond: Add 'primary' interface concept for active-backup mode.") Acked-by: Jeff Squyres <jsquyres@cisco.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
- Loading branch information