From patchwork Wed Aug 15 12:29:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 957849 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=v3.sk Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QJiRghAP"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41r81n5FRBz9sCP for ; Wed, 15 Aug 2018 22:30:21 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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:In-Reply-To: References:List-Owner; bh=EBSHmuhOLYVyQjbuCVd0al8d2sbXUcbG/xp80QbjJAU=; b=QJi RghAPlSVfI4WP8TtrLxgG7q7zytEF2oSmZdzwp/+wdD9o85/9fR8tbbe4CyTCDL/epZa9rEhJuUg2 CZqW+xQ2npbkkYsnVeu+yQ6J9Q6q5WN1uoY/7OfPbyI8oXJW6FbxOOsSWD7pXDnE6d6BOC1GMKwQd 9+rjrTFcFiixX1qObkHjSMzti8GwaZMvBJxdubaKTd4Xb7A2DUKjg7hxLY3BFqLedznXrGcJfxM2S D2QDPWjGbbhK81JFSucR0fW4JJ4msINYvcre6hcO2JNNP8+XqiAjdayqsCF08L/7SqFngHkV31l35 aENqa96izNWr6X7I6cW3eBfZbdCdw/Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpuwB-000766-4v; Wed, 15 Aug 2018 12:30:07 +0000 Received: from shell.v3.sk ([90.176.6.54]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpuvr-0006hl-7W for hostap@lists.infradead.org; Wed, 15 Aug 2018 12:29:49 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 78479B4350; Wed, 15 Aug 2018 14:29:30 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 6qnzMzpV4Wn1; Wed, 15 Aug 2018 14:29:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 85ECEB4349; Wed, 15 Aug 2018 14:29:25 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id VRn7U44XBeOA; Wed, 15 Aug 2018 14:29:25 +0200 (CEST) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id BAB44B4344; Wed, 15 Aug 2018 14:29:24 +0200 (CEST) From: Lubomir Rintel To: hostap@lists.infradead.org Subject: [PATCH 1/3] Revert "tests: D-Bus Get/Set Pmf" Date: Wed, 15 Aug 2018 14:29:15 +0200 Message-Id: <20180815122917.153803-1-lkundrak@v3.sk> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180815_052947_438641_2B70E098 X-CRM114-Status: UNSURE ( 5.88 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stijn Tintel , Jouni Malinen , Lubomir Rintel MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This is wrong. The Pmf property has a "s" signature. This reverts commit 76055b4c6115620421313038b6128f3b93d5160e. Signed-off-by: Lubomir Rintel --- tests/hwsim/test_dbus.py | 43 ---------------------------------------- 1 file changed, 43 deletions(-) diff --git a/tests/hwsim/test_dbus.py b/tests/hwsim/test_dbus.py index 486cdc7cf..b79e24ae9 100644 --- a/tests/hwsim/test_dbus.py +++ b/tests/hwsim/test_dbus.py @@ -2367,49 +2367,6 @@ def _test_dbus_apscan(dev, apdev): if_obj.Set(WPAS_DBUS_IFACE, "ApScan", dbus.UInt32(1), dbus_interface=dbus.PROPERTIES_IFACE) -def test_dbus_pmf(dev, apdev): - """D-Bus Get/Set Pmf""" - try: - _test_dbus_pmf(dev, apdev) - finally: - dev[0].request("SET pmf 0") - -def _test_dbus_pmf(dev, apdev): - (bus,wpas_obj,path,if_obj) = prepare_dbus(dev[0]) - - dev[0].set("pmf", "0") - res = if_obj.Get(WPAS_DBUS_IFACE, "Pmf", - dbus_interface=dbus.PROPERTIES_IFACE) - if res != 0: - raise Exception("Unexpected initial Pmf value: %d" % res) - - for i in range(3): - if_obj.Set(WPAS_DBUS_IFACE, "Pmf", dbus.UInt32(i), - dbus_interface=dbus.PROPERTIES_IFACE) - res = if_obj.Get(WPAS_DBUS_IFACE, "Pmf", - dbus_interface=dbus.PROPERTIES_IFACE) - if res != i: - raise Exception("Unexpected Pmf value %d (expected %d)" % (res, i)) - - try: - if_obj.Set(WPAS_DBUS_IFACE, "Pmf", dbus.Int16(-1), - dbus_interface=dbus.PROPERTIES_IFACE) - raise Exception("Invalid Set(Pmf,-1) accepted") - except dbus.exceptions.DBusException, e: - if "Error.Failed: wrong property type" not in str(e): - raise Exception("Unexpected error message for invalid Set(Pmf,-1): " + str(e)) - - try: - if_obj.Set(WPAS_DBUS_IFACE, "Pmf", dbus.UInt32(123), - dbus_interface=dbus.PROPERTIES_IFACE) - raise Exception("Invalid Set(Pmf,123) accepted") - except dbus.exceptions.DBusException, e: - if "Error.Failed: Pmf must be 0, 1, or 2" not in str(e): - raise Exception("Unexpected error message for invalid Set(Pmf,123): " + str(e)) - - if_obj.Set(WPAS_DBUS_IFACE, "Pmf", dbus.UInt32(1), - dbus_interface=dbus.PROPERTIES_IFACE) - def test_dbus_fastreauth(dev, apdev): """D-Bus Get/Set FastReauth""" (bus,wpas_obj,path,if_obj) = prepare_dbus(dev[0]) From patchwork Wed Aug 15 12:29:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 957850 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=v3.sk Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gC1H5cVo"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41r81n6Bppz9sCS for ; Wed, 15 Aug 2018 22:30:21 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=OBpU6W5jyGs1OUJ3hTTwvrWFsIijOt7R6S/WR7jHm6M=; b=gC1H5cVof7gkWayo37S/tI+xh9 CQ47Qd4Xx0xMukQ8y06tl925O/9RIfrUhjFaSt6pCyT1MrjBpSMq5dNIzWixMqVnO4Xfo9YqYVYBS dxY5CrTuSFnTOIGL0JDzJT7nGdL8CPP8rZS4+N308gMsLAQmX+JGYh0974urGTSVbxm0K+Wz9vfot ptSPTazhZXasYOFpETHybwM/xh0CUubu/Gw+TIYS+Aw8/TNFOJOJsDXcJA5rR/kn/O8pNUTEYllRF Gsad9FHYOaoq3s8K2tY1t/+jKn+XI03nIM/27s/EULTqj0h9vj3RuSxjI5zJMMGozQF1sxAVN05RB KjUVO5qQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpuwH-0007IA-6l; Wed, 15 Aug 2018 12:30:13 +0000 Received: from shell.v3.sk ([90.176.6.54]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpuvr-0006hn-9Y for hostap@lists.infradead.org; Wed, 15 Aug 2018 12:29:50 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 305F5B4345; Wed, 15 Aug 2018 14:29:32 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 86_LasWu4wxs; Wed, 15 Aug 2018 14:29:26 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id D371CB4344; Wed, 15 Aug 2018 14:29:25 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 12N2W83XKose; Wed, 15 Aug 2018 14:29:25 +0200 (CEST) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id EA647B4345; Wed, 15 Aug 2018 14:29:24 +0200 (CEST) From: Lubomir Rintel To: hostap@lists.infradead.org Subject: [PATCH 2/3] Revert "D-Bus: Implement Pmf property" Date: Wed, 15 Aug 2018 14:29:16 +0200 Message-Id: <20180815122917.153803-2-lkundrak@v3.sk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180815122917.153803-1-lkundrak@v3.sk> References: <20180815122917.153803-1-lkundrak@v3.sk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180815_052947_672253_752892F0 X-CRM114-Status: UNSURE ( 9.57 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stijn Tintel , Jouni Malinen , Lubomir Rintel MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This reverts commit adf8f45f8af27a9ac9429ecde81776b19b6f9224. It is basically all wrong. The Pmf property did exist, with a signature of "s" as documented in doc/dbus.doxygen. It was synthesized from global_fields[]. The patch added a duplicate one, with a signature of "u", in violation of D-Bus specification and to bemusement of tools that are careful enough: $ busctl introspect fi.w1.wpa_supplicant1 /fi/w1/wpa_supplicant1/Interfaces/666 Duplicate property Signed-off-by: Lubomir Rintel --- wpa_supplicant/dbus/dbus_new.c | 12 ------ wpa_supplicant/dbus/dbus_new.h | 1 - wpa_supplicant/dbus/dbus_new_handlers.c | 55 ------------------------- wpa_supplicant/dbus/dbus_new_handlers.h | 2 - 4 files changed, 70 deletions(-) diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c index e0f16bbda..d4deb0fe3 100644 --- a/wpa_supplicant/dbus/dbus_new.c +++ b/wpa_supplicant/dbus/dbus_new.c @@ -2131,11 +2131,6 @@ void wpas_dbus_signal_prop_changed(struct wpa_supplicant *wpa_s, case WPAS_DBUS_PROP_AP_SCAN: prop = "ApScan"; break; -#ifdef CONFIG_IEEE80211W - case WPAS_DBUS_PROP_PMF: - prop = "Pmf"; - break; -#endif /* CONFIG_IEEE80211W */ case WPAS_DBUS_PROP_SCANNING: prop = "Scanning"; break; @@ -3307,13 +3302,6 @@ static const struct wpa_dbus_property_desc wpas_dbus_interface_properties[] = { wpas_dbus_setter_ap_scan, NULL }, -#ifdef CONFIG_IEEE80211W - { "Pmf", WPAS_DBUS_NEW_IFACE_INTERFACE, "u", - wpas_dbus_getter_pmf, - wpas_dbus_setter_pmf, - NULL - }, -#endif /* CONFIG_IEEE80211W */ { "BSSExpireAge", WPAS_DBUS_NEW_IFACE_INTERFACE, "u", wpas_dbus_getter_bss_expire_age, wpas_dbus_setter_bss_expire_age, diff --git a/wpa_supplicant/dbus/dbus_new.h b/wpa_supplicant/dbus/dbus_new.h index e68acb7a1..40ae133b2 100644 --- a/wpa_supplicant/dbus/dbus_new.h +++ b/wpa_supplicant/dbus/dbus_new.h @@ -22,7 +22,6 @@ struct wps_credential; enum wpas_dbus_prop { WPAS_DBUS_PROP_AP_SCAN, - WPAS_DBUS_PROP_PMF, WPAS_DBUS_PROP_SCANNING, WPAS_DBUS_PROP_STATE, WPAS_DBUS_PROP_CURRENT_BSS, diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c index a3c98fadd..c81c0855d 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers.c +++ b/wpa_supplicant/dbus/dbus_new_handlers.c @@ -3012,61 +3012,6 @@ dbus_bool_t wpas_dbus_setter_ap_scan( } -#ifdef CONFIG_IEEE80211W - -/** - * wpas_dbus_getter_pmf - Control PMF default - * @iter: Pointer to incoming dbus message iter - * @error: Location to store error on failure - * @user_data: Function specific data - * Returns: TRUE on success, FALSE on failure - * - * Getter function for "Pmf" property. - */ -dbus_bool_t wpas_dbus_getter_pmf( - const struct wpa_dbus_property_desc *property_desc, - DBusMessageIter *iter, DBusError *error, void *user_data) -{ - struct wpa_supplicant *wpa_s = user_data; - dbus_uint32_t pmf = wpa_s->conf->pmf; - - return wpas_dbus_simple_property_getter(iter, DBUS_TYPE_UINT32, - &pmf, error); -} - - -/** - * wpas_dbus_setter_pmf - Control PMF default - * @iter: Pointer to incoming dbus message iter - * @error: Location to store error on failure - * @user_data: Function specific data - * Returns: TRUE on success, FALSE on failure - * - * Setter function for "Pmf" property. - */ -dbus_bool_t wpas_dbus_setter_pmf( - const struct wpa_dbus_property_desc *property_desc, - DBusMessageIter *iter, DBusError *error, void *user_data) -{ - struct wpa_supplicant *wpa_s = user_data; - dbus_uint32_t pmf; - - if (!wpas_dbus_simple_property_setter(iter, error, DBUS_TYPE_UINT32, - &pmf)) - return FALSE; - - if (pmf > 2) { - dbus_set_error_const(error, DBUS_ERROR_FAILED, - "Pmf must be 0, 1, or 2"); - return FALSE; - } - wpa_s->conf->pmf = pmf; - return TRUE; -} - -#endif /* CONFIG_IEEE80211W */ - - /** * wpas_dbus_getter_fast_reauth - Control fast * reauthentication (TLS session resumption) diff --git a/wpa_supplicant/dbus/dbus_new_handlers.h b/wpa_supplicant/dbus/dbus_new_handlers.h index 26652ad3d..6f952cc39 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers.h +++ b/wpa_supplicant/dbus/dbus_new_handlers.h @@ -141,8 +141,6 @@ DECLARE_ACCESSOR(wpas_dbus_getter_state); DECLARE_ACCESSOR(wpas_dbus_getter_scanning); DECLARE_ACCESSOR(wpas_dbus_getter_ap_scan); DECLARE_ACCESSOR(wpas_dbus_setter_ap_scan); -DECLARE_ACCESSOR(wpas_dbus_getter_pmf); -DECLARE_ACCESSOR(wpas_dbus_setter_pmf); DECLARE_ACCESSOR(wpas_dbus_getter_fast_reauth); DECLARE_ACCESSOR(wpas_dbus_setter_fast_reauth); DECLARE_ACCESSOR(wpas_dbus_getter_disconnect_reason);