[OpenWrt-Devel] [PATCH netifd 3/3] interface-event: Don't dequeue hotplug event in case of interface reload event

Hans Dedecker dedeckeh at gmail.com
Tue Sep 13 08:33:40 EDT 2016

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 at gmail.com>
 interface-event.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/interface-event.c b/interface-event.c
index 93da22b..4976c2c 100644
--- a/interface-event.c
+++ b/interface-event.c
@@ -196,9 +196,10 @@ static void interface_event_cb(struct interface_user *dep, struct interface *ifa
 			interface_queue_event(iface, ev);
 		case IFEV_FREE:
-		case IFEV_RELOAD:
+		default:
+			break;
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list