Skip to content

Commit

Permalink
northd: Fix NULL pointer deref within build_bfd_table.
Browse files Browse the repository at this point in the history
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: 4885e33 ("rbac: Only allow relevant chassis to update BFD.")
Signed-off-by: Ales Musil <amusil@redhat.com>
Acked-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Mark Michelson <mmichels@redhat.com>
(cherry picked from commit a55eb4a)
Signed-off-by: Mark Michelson <mmichels@redhat.com>
  • Loading branch information
almusil authored and putnopvut committed Sep 24, 2024
1 parent f7c3e0b commit 3338aba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions northd/northd.c
Original file line number Diff line number Diff line change
Expand Up @@ -9738,8 +9738,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);
Expand Down

0 comments on commit 3338aba

Please sign in to comment.