From fa409e1eeb74bcdf841c9c7ae16dfd2e854341bd Mon Sep 17 00:00:00 2001 From: vivek Date: Fri, 1 Dec 2017 23:31:22 -0800 Subject: [PATCH] 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 Ticket: CM-19036 Reviewed By: None Testing Done: 1. Networking restart 2. VxLAN interface disable/enable 3. VRF delete and readd --- zebra/zebra_vxlan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index 90b0516276..69ed93a084 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -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); } -- 2.39.5