summaryrefslogtreecommitdiff
path: root/zebra/interface.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2018-05-04 13:49:56 +0200
committerPhilippe Guibert <philippe.guibert@6wind.com>2018-05-04 16:50:47 +0200
commit7befff57dffd2e6ed10881cf4b72c7dc10df62c6 (patch)
treeca8f65695bdae08c4e0e593eba223a6df38a7b89 /zebra/interface.c
parent393ec5424e35d1469d6a3c9ac7cd0f38481bb359 (diff)
zebra: avoid inactivating twice an interface
This code is a sanity check to avoid double unlink of interface. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'zebra/interface.c')
-rw-r--r--zebra/interface.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index fc44be34ea..a785186e3d 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -726,6 +726,9 @@ void if_delete_update(struct interface *ifp)
return;
}
+ if (!CHECK_FLAG(ifp->status, ZEBRA_INTERFACE_ACTIVE))
+ return;
+
/* Mark interface as inactive */
UNSET_FLAG(ifp->status, ZEBRA_INTERFACE_ACTIVE);