diff options
| author | Mitesh Kanjariya <mitesh@cumulusnetworks.com> | 2018-02-27 01:46:26 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-27 01:46:26 -0800 |
| commit | 23e386ac714b48872d7d41ad118b12ebbc22984c (patch) | |
| tree | 295c1033f46f99eaacf014dde0b42beb035f1e71 /lib/if.c | |
| parent | 6fb219da876ace4732e31005466cae708e512d42 (diff) | |
| parent | ac3133a35d340a765be1518c2669b979e39fbe66 (diff) | |
Merge branch 'master' into type5-default-originate
Diffstat (limited to 'lib/if.c')
| -rw-r--r-- | lib/if.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1064,7 +1064,7 @@ ifaddr_ipv4_lookup (struct in_addr *addr, ifindex_t ifindex) rn = route_node_lookup (ifaddr_ipv4_table, (struct prefix *) &p); if (! rn) return NULL; - + ifp = rn->info; route_unlock_node (rn); return ifp; @@ -1078,7 +1078,9 @@ void if_terminate(struct vrf *vrf) { struct interface *ifp; - while ((ifp = RB_ROOT(if_name_head, &vrf->ifaces_by_name)) != NULL) { + while (!RB_EMPTY(if_name_head, &vrf->ifaces_by_name)) { + ifp = RB_ROOT(if_name_head, &vrf->ifaces_by_name); + if (ifp->node) { ifp->node->info = NULL; route_unlock_node(ifp->node); |
