Message ID | 20200716001743.4085346-2-matthewmwang@chromium.org |
---|---|
State | Accepted |
Headers | show
Return-Path: <hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=wXIuJ4CP; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=jnUOmVBZ; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B6ZcV4NZkz9sDX for <incoming@patchwork.ozlabs.org>; Thu, 16 Jul 2020 10:19:06 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=srUOjwwyZWNz4PoQ3geo+y7VIOtHk/KArc0UwUxKFTY=; b=wXIuJ4CPUoFP5C4TT4C3msz40 WxO5aiaEBOLEoUcmVAECrxe+YsVsJ7ZBGPdJqoB8eOJ/xtZ+/RoNsPUXS1prLvl+grF0P1+RFzdFG WnhZD2dXZ4qAcaEq+ebP+YhX/CQ9ZKklDxaA91Sw7zLXuYc4ipciwMMZs/JtDtFgR4/D9Lvg2Xiz2 E2EYk3Sjd5aMmOgBoc/vxGsZ+LPArLZORpH+v+7gF90N9/YN8sRZiFY4wxuWF3br+DCzzJePuobfP ynKH+ZxILjegHOJmJVZOMj+xjDKpqt0s3t0HUu/aYhGpNiNKxwIdOv7E10YJht5J14AwQOG5gJAs0 q5pFiIRww==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvrbB-0001Jm-UB; Thu, 16 Jul 2020 00:18:05 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvrb7-0001Iy-Gl for hostap@lists.infradead.org; Thu, 16 Jul 2020 00:18:02 +0000 Received: by mail-pg1-x544.google.com with SMTP id l63so3909303pge.12 for <hostap@lists.infradead.org>; Wed, 15 Jul 2020 17:18:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fTLrnxiID8N6DNaSS5JtgQ5b2f09xaneCxkvRbKz8Gs=; b=jnUOmVBZQRN/tuLjnI/yv2w+94wFd9NtAdSL8oNPuCfz2x49eT2x+klcZjpzLHYoS/ 8s8/aoaJlg5DBjampvwSu7Kgu2nY9FZTFB2Z7RqlM4J6BxMhjHi16BHZ1XjR5E0sJrye DJFK1BwAv4D9CUJ5+Nt8L/aRJXpj/omMbKNC8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fTLrnxiID8N6DNaSS5JtgQ5b2f09xaneCxkvRbKz8Gs=; b=aw/eehDl2jhQ2f/jsJkxQttdQ7EjQXLY5SwkZNc2Vhb0vcGdC7/pNc0rtIJ4hT0y7D fTIxVqTn0RpK/4ALGUHLFp1y2RQddSfdp/Wnqi1umA77V23kFOtnlmiGylwuaZwob2h2 7boRHoF4u0cyIf45IvA9wkJ2as/2u5ghI9wj+rnfH1nWF2pRSl/FfSa/JLaXElClIAS8 OctcYV3Oux3LDn8W4d4oeUdAGQcRP6khyidF1d0/v/rn9OpwwM8K6l4tEt5b7yjOZSFk SgtMWaYigxi51N7fr/gAj3iNxCCC15VF/h22zV5R1pOjGY6YQP5V1IOqE4jSdsWHE6F4 Hbyw== X-Gm-Message-State: AOAM532nY/2GRjGNiHSR0IYWPmwXI8LTZxYpBk4a6dvy20WcU6p2Ly2G V8073XNdPcR0DPyDr65bFIwfIA== X-Google-Smtp-Source: ABdhPJyN/ZsX2/otWygtRbk89A3pYE/52i9Smf2nXPC5IZ1TD4tI8ozJ+Cgwm68Rc/gn5eNpR3zdMQ== X-Received: by 2002:a62:8342:: with SMTP id h63mr1423740pfe.183.1594858678790; Wed, 15 Jul 2020 17:17:58 -0700 (PDT) Received: from localhost ([2620:15c:202:201:cad3:ffff:feb9:25d2]) by smtp.gmail.com with ESMTPSA id b21sm3096478pfp.172.2020.07.15.17.17.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Jul 2020 17:17:58 -0700 (PDT) From: Matthew Wang <matthewmwang@chromium.org> To: j@w1.fi Subject: [PATCH V2 1/4] skip property update actions when wpa_config_set returns 1 Date: Wed, 15 Jul 2020 17:17:40 -0700 Message-Id: <20200716001743.4085346-2-matthewmwang@chromium.org> X-Mailer: git-send-email 2.27.0.389.gc38d7665816-goog In-Reply-To: <20200716001743.4085346-1-matthewmwang@chromium.org> References: <20200716001743.4085346-1-matthewmwang@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200715_201801_593911_AE4D3851 X-CRM114-Status: GOOD ( 13.08 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:544 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <hostap.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/hostap>, <mailto:hostap-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/hostap/> List-Post: <mailto:hostap@lists.infradead.org> List-Help: <mailto:hostap-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/hostap>, <mailto:hostap-request@lists.infradead.org?subject=subscribe> Cc: hostap@lists.infradead.org, Matthew Wang <matthewmwang@chromium.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Hostap" <hostap-bounces@lists.infradead.org> Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
allow reconfiguration of bgscan
|
expand
|
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c index d1f9607c6..93eeb30e1 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers.c +++ b/wpa_supplicant/dbus/dbus_new_handlers.c @@ -267,8 +267,15 @@ dbus_bool_t set_network_properties(struct wpa_supplicant *wpa_s, } else goto error; - if (wpa_config_set(ssid, entry.key, value, 0) < 0) + ret = wpa_config_set(ssid, entry.key, value, 0); + if (ret < 0) goto error; + if (ret == 1) { + os_free(value); + value = NULL; + wpa_dbus_dict_entry_clear(&entry); + continue; + } if (os_strcmp(entry.key, "bssid") != 0 && os_strcmp(entry.key, "priority") != 0)
When network properties are updated via dbus, wpa_config_set is used to update the property in the wpa_ssid struct. If it returns 1, the property was not changed and there's no need to perform any of the update actions. Signed-off-by: Matthew Wang <matthewmwang@chromium.org> --- wpa_supplicant/dbus/dbus_new_handlers.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)