remove a bogus return statement
[project/netifd.git] / ubus.c
diff --git a/ubus.c b/ubus.c
index 7e2d2ea875876dcd43fd58f28d93b59eb628cc92..ca5d11021c831bcc41fa9ba594fde6aa900ec893 100644 (file)
--- a/ubus.c
+++ b/ubus.c
@@ -308,6 +308,15 @@ static struct ubus_object_type iface_object_type =
        UBUS_OBJECT_TYPE("netifd_iface", iface_object_methods);
 
 
+void
+netifd_ubus_interface_event(struct interface *iface, bool up)
+{
+       blob_buf_init(&b, 0);
+       blobmsg_add_string(&b, "action", up ? "ifup" : "ifdown");
+       blobmsg_add_string(&b, "interface", iface->name);
+       ubus_send_event(ctx, "network.interface", b.head);
+}
+
 void
 netifd_ubus_add_interface(struct interface *iface)
 {