mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 07:03:07 +00:00
zebra: Fix dest dereference
The rn can not have an rn->info pointer and as such the dest may be NULL. Don't assign the old_fib pointer if so. This is ok because we know RNODE_FOREACH... will not iterate if dest is NULL. Fixes: #1575 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
ff99c5b2bb
commit
607425e554
@ -1471,7 +1471,14 @@ static void rib_process(struct route_node *rn)
|
|||||||
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
|
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
|
||||||
zlog_debug("%u:%s: Processing rn %p", vrf_id, buf, rn);
|
zlog_debug("%u:%s: Processing rn %p", vrf_id, buf, rn);
|
||||||
|
|
||||||
old_fib = dest->selected_fib;
|
/*
|
||||||
|
* we can have rn's that have a NULL info pointer
|
||||||
|
* (dest). As such let's not let the deref happen
|
||||||
|
* additionally we know RNODE_FOREACH_RE_SAFE
|
||||||
|
* will not iterate so we are ok.
|
||||||
|
*/
|
||||||
|
if (dest)
|
||||||
|
old_fib = dest->selected_fib;
|
||||||
|
|
||||||
RNODE_FOREACH_RE_SAFE (rn, re, next) {
|
RNODE_FOREACH_RE_SAFE (rn, re, next) {
|
||||||
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
|
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
|
||||||
|
Loading…
Reference in New Issue
Block a user