Fix ifupdate events
authorSteven Barth <steven@midlink.org>
Sat, 19 Oct 2013 11:00:49 +0000 (13:00 +0200)
committerSteven Barth <steven@midlink.org>
Sat, 19 Oct 2013 11:00:49 +0000 (13:00 +0200)
interface-event.c

index fe4759e6b5161c7742546cf78d78e20a354f46f8..707764ae6d566b44aa41b307265e9ca5fe168e2c 100644 (file)
@@ -111,9 +111,9 @@ interface_queue_event(struct interface *iface, enum interface_event ev)
                last_ev = iface->hotplug_ev;
 
        iface->hotplug_ev = ev;
-       if (last_ev == ev && !list_empty(&iface->hotplug_list))
+       if ((last_ev == ev && ev != IFEV_UPDATE) && !list_empty(&iface->hotplug_list))
                list_del_init(&iface->hotplug_list);
-       else if (last_ev != ev && list_empty(&iface->hotplug_list))
+       else if ((last_ev != ev || ev == IFEV_UPDATE) && list_empty(&iface->hotplug_list))
                list_add(&iface->hotplug_list, &pending);
 
        if (!task.pending && !current)