interface-event: Don't dequeue hotplug event in case of interface reload event
authorHans Dedecker <dedeckeh@gmail.com>
Tue, 13 Sep 2016 12:33:40 +0000 (14:33 +0200)
committerFelix Fietkau <nbd@nbd.name>
Wed, 14 Sep 2016 12:50:43 +0000 (14:50 +0200)
Dropping hotplug event in case of interface reload results into hotplug scripts
not being being run for the interface and thus external actors not being informed
about the actual state of the interface.

This is clearly visible if the interface auto parameter is set to disabled for
multiple interfaces resulting into no hotplug down event for all interfaces.

Therefore don't flush the interface hotplug queue in case an interface reload
event is observed.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
interface-event.c

index 93da22bf5557a9d3e0ee3be930b322cec96fa388..4976c2cf032d6b3bc25069f03398aefd454f3d50 100644 (file)
@@ -196,9 +196,10 @@ static void interface_event_cb(struct interface_user *dep, struct interface *ifa
                        interface_queue_event(iface, ev);
                        break;
                case IFEV_FREE:
-               case IFEV_RELOAD:
                        interface_dequeue_event(iface);
                        break;
+               default:
+                       break;
        }
 }