summaryrefslogtreecommitdiffstats
path: root/lib/if.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/if.c')
-rw-r--r--lib/if.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/if.c b/lib/if.c
index de9ec46ff..5a46a8026 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -181,6 +181,14 @@ void if_new_via_zapi(struct interface *ifp)
(*ifp_master.create_hook)(ifp);
}
+void if_destroy_via_zapi(struct interface *ifp)
+{
+ if (ifp_master.destroy_hook)
+ (*ifp_master.destroy_hook)(ifp);
+
+ if_set_index(ifp, IFINDEX_INTERNAL);
+}
+
void if_up_via_zapi(struct interface *ifp)
{
if (ifp_master.up_hook)