summaryrefslogtreecommitdiffstats
path: root/zebra
diff options
context:
space:
mode:
authorKishore Aramalla <karamalla@vmware.com>2019-04-11 21:04:34 +0200
committerKishore Aramalla <karamalla@vmware.com>2019-04-11 21:04:34 +0200
commit7a6ca8a6aee50d2724e379f22ac9205e1fae06ab (patch)
treecb56ec6c5d42fc8ef1319ba2d790b12d896851e3 /zebra
parentMerge pull request #4119 from pacovn/201904_master__pw_fixes (diff)
downloadfrr-7a6ca8a6aee50d2724e379f22ac9205e1fae06ab.tar.xz
frr-7a6ca8a6aee50d2724e379f22ac9205e1fae06ab.zip
zebra: L3VNI's are allowed to unconfigure from any VRF
L3VNI configured in a specific VRF is allowed to unconfigure from any VRF, including default (global) VRF. This results L3VNI delete notification to BGP and subsequent type-5 route uninstall from the VRF the L3VNI belong to. This also resulted in the inconsistent running configuration. The deleted L3VNI still shows up in its original VRF. The VRF in which the "no vni <x>" was executed doesn't display its own L3VNI. Added a VRF check in zebra to prevent this. Signed-off-by: Kishore Aramalla <karamalla@vmware.com>
Diffstat (limited to 'zebra')
-rw-r--r--zebra/zebra_vxlan.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index 3a8426e77..9afa915d5 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -8688,6 +8688,13 @@ int zebra_vxlan_process_vrf_vni_cmd(struct zebra_vrf *zvrf, vni_t vni,
return -1;
}
+ if (zvrf->l3vni != vni) {
+ snprintf(err, err_str_sz,
+ "VNI %d doesn't exist in VRF: %s",
+ vni, zvrf->vrf->name);
+ return -1;
+ }
+
if (filter && !CHECK_FLAG(zl3vni->filter, PREFIX_ROUTES_ONLY)) {
snprintf(err, ERR_STR_SZ,
"prefix-routes-only is not set for the vni");