From patchwork Tue Sep 13 12:33:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Dedecker X-Patchwork-Id: 669319 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sYPJ62Npkz9s9x for ; Tue, 13 Sep 2016 22:34:30 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=zC5neSSd; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id A3063B9211D; Tue, 13 Sep 2016 14:33:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Tue, 13 Sep 2016 14:33:56 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id B1373B920FF for ; Tue, 13 Sep 2016 14:33:50 +0200 (CEST) X-policyd-weight: using cached result; rate:hard: -7 Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Tue, 13 Sep 2016 14:33:50 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id c131so2781567wmh.2 for ; Tue, 13 Sep 2016 05:33:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=x9IJb8Ye6IcKCTXLjqoE62E1reUS5HvipCLPZ5v5I2s=; b=zC5neSSdCMc0SSImwCx2Pa04leUpJVEHX7ioTFYfzNFQHSrLjGiPokOqiJ6T1xU7HR r9abPgkfi3o4icXGoH4fGEciik6X+5qobTA8GpgC3MxBrya+JQbxSPVcVbjTK7S/3CIO bYtn5QWU1Pq9+2F9zFBgv+ythT5GGODCM9kVYIq8YZOiAV1OZyh5URTuEPsHroG6hDLl wD+E8Yqtt+YkN/zme+13zexqpb83j5fR3ff5eigmYnpq+TVfEN9f9XdSZvfbfasvrUx8 gV/X7MtYiNEbw1eJGohsj7xcsV7+c7u392HbtoCS4kYyo94k0XkB+P93x9hsd75PK3r/ RVXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=x9IJb8Ye6IcKCTXLjqoE62E1reUS5HvipCLPZ5v5I2s=; b=QVbaygik9oIbaBQP+C0CQne45/lN7RJShINMHym5rDStvEEJlvWH0Qo96vhFNkgBs+ gRkn53EpSreT9cJhSrnXj2rHi3tmWmPhqj501/yqgBVVIMWgBmd7MMmV0PTCerRRyeG8 ugWZ/vZbB8RqjqbnvEARHaniNvm8RLJZd8qXtIFTNoYqyTFVQmRWnVgKkSX/XV5EuxYY kUyIQbFH1bp7AywH5P9ddF76Dtunxs8l3dF6a7vnRJqHEwDIjFMYyfVxWmJWEY7cR4Hr NmbXgc3CwwIN0v1ixuOLkGFzK+FThEOx2744AXWEcU6KHHQA8XHyFmAbSu9wEpgSDeM9 N/bA== X-Gm-Message-State: AE9vXwMNao1Ippuj1j1XPDay9mxTsO+asBCFeT4ieqhw8A3EWT4uvQyWqoUC25jpWuVoLw== X-Received: by 10.28.143.7 with SMTP id r7mr541684wmd.65.1473770030314; Tue, 13 Sep 2016 05:33:50 -0700 (PDT) Received: from cplx43.eu.thmulti.com ([141.11.62.7]) by smtp.gmail.com with ESMTPSA id yt4sm22715991wjc.48.2016.09.13.05.33.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Sep 2016 05:33:49 -0700 (PDT) From: Hans Dedecker To: lede-dev@lists.infradead.org, openwrt-devel@lists.openwrt.org Date: Tue, 13 Sep 2016 14:33:40 +0200 Message-Id: <1473770020-19533-3-git-send-email-dedeckeh@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1473770020-19533-1-git-send-email-dedeckeh@gmail.com> References: <1473770020-19533-1-git-send-email-dedeckeh@gmail.com> Subject: [OpenWrt-Devel] [PATCH netifd 3/3] interface-event: Don't dequeue hotplug event in case of interface reload event X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans Dedecker MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" 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 --- 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); break; case IFEV_FREE: - case IFEV_RELOAD: interface_dequeue_event(iface); break; + default: + break; } }