Skip to content

Commit

Permalink
Merge pull request #1584 from donaldsharp/1575_fix
Browse files Browse the repository at this point in the history
zebra: Fix dest dereference
  • Loading branch information
riw777 authored Jan 2, 2018
2 parents 82b9bf3 + 607425e commit baa68bc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion zebra/zebra_rib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1471,7 +1471,14 @@ static void rib_process(struct route_node *rn)
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
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) {
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
Expand Down

0 comments on commit baa68bc

Please sign in to comment.