static struct uloop_process task = {
.cb = task_complete,
};
-static const char * const eventnames[] = {"ifdown", "ifup", "ifupdate"};
+static const char * const eventnames[] = {
+ [IFEV_DOWN] = "ifdown",
+ [IFEV_UP] = "ifup",
+ [IFEV_UPDATE] = "ifupdate",
+ [IFEV_FREE] = "free",
+ [IFEV_RELOAD] = "reload",
+ [IFEV_LINK_UP] = "iflink",
+};
static void
run_cmd(const char *ifname, const char *device, enum interface_event event,
netifd_ubus_interface_notify(iface, ev != IFEV_DOWN);
+ /* no hotplug.d calls for link up */
+ if (ev == IFEV_LINK_UP)
+ return;
+
if (current == iface) {
/* an event for iface is being processed */
if (!list_empty(&iface->hotplug_list)) {
enum interface_event ev)
{
switch (ev) {
+ case IFEV_LINK_UP:
case IFEV_UP:
case IFEV_UPDATE:
case IFEV_DOWN:
interface_queue_event(iface, ev);
break;
case IFEV_FREE:
- case IFEV_RELOAD:
interface_dequeue_event(iface);
break;
+ default:
+ break;
}
}