add a new event for interface free
authorFelix Fietkau <nbd@openwrt.org>
Fri, 4 May 2012 12:56:15 +0000 (14:56 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 4 May 2012 12:56:15 +0000 (14:56 +0200)
interface.c
interface.h

index 5614d39ff28863df17cc84b48ec5534115b5751e..acf30da219c788e3f5cc3432ba3e6a7f186efe44 100644 (file)
@@ -265,6 +265,7 @@ interface_cleanup(struct interface *iface, bool reload)
 static void
 interface_do_free(struct interface *iface)
 {
+       interface_event(iface, IFEV_FREE);
        interface_cleanup(iface, false);
        free(iface->config);
        netifd_ubus_remove_interface(iface);
index e89db701ecf36cdb5c4be43ce0f35c56eba8a80f..14aefce7c58ff77771878e8edda01b2b3c3744aa 100644 (file)
@@ -10,6 +10,7 @@ struct interface_proto_state;
 enum interface_event {
        IFEV_DOWN,
        IFEV_UP,
+       IFEV_FREE,
 };
 
 enum interface_state {