summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-03-25 08:13:16 -0400
committerGitHub <noreply@github.com>2019-03-25 08:13:16 -0400
commitc9146c85a0356a9c62b52f384025bfe0ff65c654 (patch)
tree6f93b5c83b955c7cd1d293adf039793f92d8450c /lib/if.c
parent08d47116842f8206b23f1defa520bf23283e3588 (diff)
parentb0b97a7f6103202884311ae52c7bac202c83d24e (diff)
Merge pull request #3772 from pguibert6WIND/vrf_backend_unknown
Vrf backend unknown
Diffstat (limited to 'lib/if.c')
-rw-r--r--lib/if.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/if.c b/lib/if.c
index abcc6c5d3c..5b1473af40 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -396,6 +396,7 @@ struct interface *if_get_by_name(const char *name, vrf_id_t vrf_id)
struct interface *ifp;
switch (vrf_get_backend()) {
+ case VRF_BACKEND_UNKNOWN:
case VRF_BACKEND_NETNS:
ifp = if_lookup_by_name(name, vrf_id);
if (ifp)
@@ -1279,6 +1280,11 @@ static int lib_interface_create(enum nb_event event,
vrf->name);
return NB_ERR_VALIDATION;
}
+
+ /* if VRF is netns or not yet known - init for instance
+ * then assumption is that passed config is exact
+ * then the user intent was not to use an other iface
+ */
if (vrf_get_backend() == VRF_BACKEND_VRF_LITE) {
ifp = if_lookup_by_name_all_vrf(ifname);
if (ifp && ifp->vrf_id != vrf->vrf_id) {