From patchwork Mon Dec 22 14:46:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Dedecker X-Patchwork-Id: 423413 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.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 73A8C1400B7 for ; Tue, 23 Dec 2014 01:46:42 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 31EDB28C069; Mon, 22 Dec 2014 15:44:41 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) 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 version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 0637328C066 for ; Mon, 22 Dec 2014 15:44:36 +0100 (CET) X-policyd-weight: using cached result; rate:hard: -8.5 Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Mon, 22 Dec 2014 15:44:35 +0100 (CET) Received: by mail-wi0-f175.google.com with SMTP id l15so8218260wiw.14 for ; Mon, 22 Dec 2014 06:46:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=lzAxQCiseFjTKPzkhoJrk19SIoF8JZGMazQWBqnxxD0=; b=o0JkSs/9HIkA3vbHBL692oSPiY+ks/ktVSEwIxe0dldvI5hBAYVh4tOZNa5iQaGjjf 1APvHBEBT9XL+hxE24LZT6DqI9AXWPuMs2tb4snLXnB2RbKEYIi8swq/5iaeztgwm8cd Fa476KlTIhetejQNqhUlKOK7FVaBKeNx9A9TaynNj21tX/JmEk5IPWw/d03igEoWcLjX z6NYfrUDFlprnHPshyZf/weunhlT4Sr0vujkgq8rGAg9nqlYytS/9MMPMIW+6LoXBVrc VEmfcPGXjV3S7ram3CgJD3FY5aBJYrxTb5USzl6wyW3ZKJH5HpGcgn8m7IYBMXC6Tvxr 6DeA== X-Received: by 10.194.91.205 with SMTP id cg13mr42648550wjb.21.1419259589348; Mon, 22 Dec 2014 06:46:29 -0800 (PST) Received: from cplx43.eu.thmulti.com ([141.11.62.7]) by mx.google.com with ESMTPSA id gf6sm23965798wjc.11.2014.12.22.06.46.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 Dec 2014 06:46:28 -0800 (PST) From: Hans Dedecker To: openwrt-devel@lists.openwrt.org Date: Mon, 22 Dec 2014 15:46:16 +0100 Message-Id: <1419259576-12459-1-git-send-email-dedeckeh@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: Hans Dedecker , cyrus@openwrt.org Subject: [OpenWrt-Devel] [PATCH] netifd: Handle link down event in interface setup state as well X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Signed-off-by: Hans Dedecker --- interface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/interface.c b/interface.c index 4b5405e..83d7f94 100644 --- a/interface.c +++ b/interface.c @@ -271,6 +271,7 @@ interface_check_state(struct interface *iface) switch (iface->state) { case IFS_UP: + case IFS_SETUP: if (!iface->enabled || !link_state) { interface_proto_event(iface->proto, PROTO_CMD_TEARDOWN, false); mark_interface_down(iface);