From: Renato Westphal Date: Mon, 23 Sep 2019 12:37:49 +0000 (-0300) Subject: isisd: fix crash during candidate validation X-Git-Tag: base_7.3~313^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=8811b9a1d0391e9401ac0d709b61e5d18145d098;p=matthieu%2Ffrr.git isisd: fix crash during candidate validation The "abort_if_not_found" parameter of nb_running_get_entry() should be set to true only when this function is called during the NB_EV_APPLY phase of a northbound callback. Failure to respect this can lead to crashes when multiple configuration changes are being committed at the same time. Signed-off-by: Renato Westphal --- diff --git a/isisd/isis_northbound.c b/isisd/isis_northbound.c index bd61918697..d74abd74fb 100644 --- a/isisd/isis_northbound.c +++ b/isisd/isis_northbound.c @@ -1542,9 +1542,9 @@ static int lib_interface_isis_create(enum nb_event event, /* check if interface mtu is sufficient. If the area has not * been created yet, assume default MTU for the area */ - ifp = nb_running_get_entry(dnode, NULL, true); + ifp = nb_running_get_entry(dnode, NULL, false); /* zebra might not know yet about the MTU - nothing we can do */ - if (ifp->mtu == 0) + if (!ifp || ifp->mtu == 0) break; actual_mtu = if_is_broadcast(ifp) ? ifp->mtu - LLC_LEN : ifp->mtu;