From patchwork Tue Sep 1 12:43:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Dedecker X-Patchwork-Id: 512807 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 F1F4A14056B for ; Tue, 1 Sep 2015 22:45:11 +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=o3lhA6dS; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 3EFE528C66E; Tue, 1 Sep 2015 14:43:29 +0200 (CEST) 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 7A53F28C667 for ; Tue, 1 Sep 2015 14:43:23 +0200 (CEST) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Tue, 1 Sep 2015 14:43:23 +0200 (CEST) Received: by wicmc4 with SMTP id mc4so31737319wic.0 for ; Tue, 01 Sep 2015 05:44:21 -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; bh=X2MH2LsTOO+0a9ShM/KP9gEkKCGQ7GLLx0SgZiVft3g=; b=o3lhA6dSF9Ec5EDS0Z7784jZZyP04mGdNXcLLGGtvwLw4fl/PbP3yy+W6iCcRdA7ND 3cnatHqt0H9ZFOkFMR91UIBvsr7KD+mhjISn7H8yaPJglJ/zrraebR6MyEynnBC1tTkU 6523oF0iCZXfkzwunC1tWH6ec+vaspZ1VKEic8wIOn98mVX5zxPyiRYZdLyEmrqEmiVe H22NQ4NOJCjtBEiIEuJ6bjS9KAJKNwle41CN0If+aFMvONbTwC092KO5Yb0X7BNumxVn stU+jYnHHu0MY6Jd0ttMZIiospiDxJALaCuHP+8Ytjh2c7FmmZhLcKAeWOPebC4N0Rh4 9Orw== X-Received: by 10.180.37.164 with SMTP id z4mr3252063wij.28.1441111461197; Tue, 01 Sep 2015 05:44:21 -0700 (PDT) Received: from cplx43.eu.thmulti.com ([141.11.62.7]) by smtp.gmail.com with ESMTPSA id im10sm27036529wjb.40.2015.09.01.05.44.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 01 Sep 2015 05:44:20 -0700 (PDT) From: Hans Dedecker To: openwrt-devel@lists.openwrt.org Date: Tue, 1 Sep 2015 14:43:57 +0200 Message-Id: <1441111438-30921-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 1/2] netifd : Apply device settings when existing device becomes external 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" Make sure device settings are applied when existing device becomes external Signed-off-by: Hans Dedecker --- device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/device.c b/device.c index 4a8db70..0d73138 100644 --- a/device.c +++ b/device.c @@ -446,6 +446,7 @@ device_get(const char *name, int create) dev = avl_find_element(&devices, name, dev, avl); if (dev) { if (create > 1 && !dev->external) { + system_if_apply_settings(dev, &dev->settings, dev->settings.flags); dev->external = true; device_set_present(dev, true); }