zebra: Fix check when uninstalling remote next hops

Only check on L3-VNI SVI status when uninstalling remote next hops.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>

Ticket: CM-19036
Reviewed By: None
Testing Done:
1. Networking restart
2. VxLAN interface disable/enable
3. VRF delete and readd
This commit is contained in:
vivek 2017-12-01 23:31:22 -08:00 committed by mitesh
parent d560078848
commit fa409e1eeb

View File

@ -3231,13 +3231,13 @@ static int zl3vni_nh_install(zebra_l3vni_t *zl3vni,
static int zl3vni_nh_uninstall(zebra_l3vni_t *zl3vni,
zebra_neigh_t *n)
{
if (!is_l3vni_oper_up(zl3vni))
return -1;
if (!(n->flags & ZEBRA_NEIGH_REMOTE) ||
!(n->flags & ZEBRA_NEIGH_REMOTE_NH))
return 0;
if (!zl3vni->svi_if || !if_is_operative(zl3vni->svi_if))
return 0;
return kernel_del_neigh(zl3vni->svi_if, &n->ip);
}