diff options
| author | Russ White <russ@riw.us> | 2018-01-02 11:32:09 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-02 11:32:09 -0500 |
| commit | baa68bca40d93e01d71f0e2723ef4ceddd3f6f97 (patch) | |
| tree | 280c19398991e7039758e3a763d80699645dd65d /zebra/zebra_rib.c | |
| parent | 82b9bf314590037f3bbf818f7d2d8b5cd81be4e0 (diff) | |
| parent | 607425e5544a3f3afbb4d9b811e62433daf2c691 (diff) | |
Merge pull request #1584 from donaldsharp/1575_fix
zebra: Fix dest dereference
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 3eaf5597b2..83834899c8 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -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) |
