ovn-controller: avoid null ptr dereference
Avoid null pointer dereference in fdb_calculate_active_tunnels()
when integration bridge isn't present. This is easily encountered
by executing "make sandbox SANDBOXFLAGS=--ovn".
Fixes: ("ovn: l3ha, enable bfd between tunnel endpoints")
@@ -62,6 +62,11 @@ bfd_calculate_active_tunnels(const struct ovsrec_bridge *br_int,
{
int i;
+ if (!br_int) {
+ /* Nothing to do if integration bridge doesn't exist. */
+ return;
+ }
+
for (i = 0; i < br_int->n_ports; i++) {
const struct ovsrec_port *port_rec = br_int->ports[i];
