summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2018-01-23 08:25:01 +0100
committerGitHub <noreply@github.com>2018-01-23 08:25:01 +0100
commitd6fed381094ba34c04166b08cd16af01f6c263ea (patch)
tree84eef98e9afe3c57dc9dff2e28a117c79511b936 /lib/if.c
parent5c6580957d18884f12dd8cdab9945b6f6bafd0ce (diff)
parent61408536df768ec97b235b463453b64f4e813369 (diff)
Merge pull request #1618 from donaldsharp/zebra_startup_ordering
zebra route-leaking for static routes
Diffstat (limited to 'lib/if.c')
-rw-r--r--lib/if.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/if.c b/lib/if.c
index 8e6a9a6968..fdcd563a5d 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -219,6 +219,18 @@ struct interface *if_lookup_by_index(ifindex_t ifindex, vrf_id_t vrf_id)
struct vrf *vrf;
struct interface if_tmp;
+ if (vrf_id == VRF_UNKNOWN) {
+ struct interface *ifp;
+
+ RB_FOREACH(vrf, vrf_id_head, &vrfs_by_id) {
+ ifp = if_lookup_by_index(ifindex, vrf->vrf_id);
+ if (ifp)
+ return ifp;
+ }
+
+ return NULL;
+ }
+
vrf = vrf_lookup_by_id(vrf_id);
if (!vrf)
return NULL;