zebra: remove unncecessary check for l3vni

Since `l3vni` created by `zl3vni_add()` is always valid, remove the check
for it.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
This commit is contained in:
anlan_cs 2022-05-11 21:29:10 -04:00
parent 64643ba79a
commit 0717f2d83c

View File

@ -5288,10 +5288,6 @@ int zebra_vxlan_process_vrf_vni_cmd(struct zebra_vrf *zvrf, vni_t vni,
/* add the L3-VNI to the global table */ /* add the L3-VNI to the global table */
zl3vni = zl3vni_add(vni, zvrf_id(zvrf)); zl3vni = zl3vni_add(vni, zvrf_id(zvrf));
if (!zl3vni) {
snprintf(err, err_str_sz, "Could not add L3-VNI");
return -1;
}
/* associate the vrf with vni */ /* associate the vrf with vni */
zvrf->l3vni = vni; zvrf->l3vni = vni;