diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2018-01-23 08:25:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-23 08:25:01 +0100 |
| commit | d6fed381094ba34c04166b08cd16af01f6c263ea (patch) | |
| tree | 84eef98e9afe3c57dc9dff2e28a117c79511b936 /lib/if.c | |
| parent | 5c6580957d18884f12dd8cdab9945b6f6bafd0ce (diff) | |
| parent | 61408536df768ec97b235b463453b64f4e813369 (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.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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; |
