The cb_bt pointer was pointing to different struct and might
have been NULL at this point. Make sure we are using the correct
pointer in the strcmp() and sbrec_bfd_set_chassis_name() call.

At the same time make sure we are actually running all tests that
do require the BFD beacon, as it was skipped in all CI stages. The
OpenBFDD project is not available as rpm, so we need to compile it
from source.

Fixes: 4885e337f929 ("rbac: Only allow relevant chassis to update BFD.")
Signed-off-by: Ales Musil <[email protected]>
Acked-by: Mark Michelson <[email protected]>
Signed-off-by: Mark Michelson <[email protected]>
(cherry picked from commit a55eb4a15f53c8169bd5f558ec2b1af0028e4d83)
---
 northd/northd.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/northd/northd.c b/northd/northd.c
index d3ff7629d..6a4f8f222 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -10775,8 +10775,9 @@ build_bfd_table(struct ovsdb_idl_txn *ovnsb_txn,
             }
             build_bfd_update_sb_conf(nb_bt, bfd_e->sb_bt);
             if (op && op->sb && op->sb->chassis &&
-                strcmp(op->sb->chassis->name, sb_bt->chassis_name)) {
-                sbrec_bfd_set_chassis_name(sb_bt, op->sb->chassis->name);
+                strcmp(op->sb->chassis->name, bfd_e->sb_bt->chassis_name)) {
+                sbrec_bfd_set_chassis_name(bfd_e->sb_bt,
+                                           op->sb->chassis->name);
             }
 
             hmap_remove(&sb_only, &bfd_e->hmap_node);
-- 
2.46.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to