From patchwork Thu Feb 13 08:51:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 1237347 Return-Path: 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=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=quantenna.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20170209 header.b=RT5mgT6K; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=quantenna.com header.i=@quantenna.com header.a=rsa-sha256 header.s=selector1 header.b=ktfQ2F96; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 48J9M05nsqz9sP7 for ; Thu, 13 Feb 2020 19:55:08 +1100 (AEDT) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: 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=iANHs14nwppvhetjn1f+sFpRgZK3G2RdhSy+mhg0DUk=; b=RT5mgT6KCT8Y2I bnVFJ2jZCLCvRM8yQGYHrbDH/VlmxPF5jft+TcGPqeD+EQm/nyiPS80AHkpbChyrtUSszR8PDQCMh QUatWmGtlTm1bw8FEW+OMhNmikMsDY4A02u1AfUDRKqi7oHDUFQUP1vWkBAKAaine/grCpoqEJFSL 0WwZnIZELknK+vyTYTZ10QFHpUFKsmXg3jSiTcb+WdG84CThhfk2WqGlVCQ1nWrTG1ddt2wO0sdid AcsmpYeqD4UF8WRIgMFPRyDj9gcB5aHpPoW8/2Tut8AlQlCk8oFDLESaDWQFpOMzWIJvqJRxRaN27 Nv/EPnH0oTniyZCAgZoA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j2AGy-0004RN-Hn; Thu, 13 Feb 2020 08:55:00 +0000 Received: from mx0b-00183b01.pphosted.com ([67.231.157.42] helo=mx0a-00183b01.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j2AGm-0004GZ-0O for hostap@lists.infradead.org; Thu, 13 Feb 2020 08:54:49 +0000 Received: from pps.filterd (m0048104.ppops.net [127.0.0.1]) by mx0b-00183b01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01D8rXHc019800 for ; Thu, 13 Feb 2020 01:54:47 -0700 Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2105.outbound.protection.outlook.com [104.47.70.105]) by mx0b-00183b01.pphosted.com with ESMTP id 2y1unaks7t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 13 Feb 2020 01:54:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aRr/wEOOz6qP8ZGM1TAqPK5UZ2CNm5CfIi6sL+FCQTLJ0rfTkCHG3CPInHGkKfIBwzb7th9x4y/PD2ioL9Tuy6vxw+lZvODxi3GR6/ZjWL8XOsvRRx+wrwP862BzqMMiBDqADnBlj7EsAgC+DXTMxcnlxzJIYuP0kprEbcAUNhn7AX31vFDeccDGnvUYAfQnAiymF3wV5kvvfIidEPu8dMjQCmfPi2MKLcV7ttjNvLm+vHLA6yqwRVD/NGdUaBWzGtvUS6i+haQ93o6t26v7VkVRGvvaHgviIvp73vMebrV5xpSld5jXjh/yZY2PfAZ/5ishJ7cxxL5rZOHe5nDrAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iR/oM1NzOx5iOo2BWN21xzuO/3uXpVKzQI1vf+g09BY=; b=iQZpiO6PoutiTPTXcalg9ccjX90gbcJSRDpXkQ5B9cEizkrf/Wyix+MNdDYZwT3ATMiGMuvAdBe07kK8D+ZLtTVdbxpaWLwER04vDXrXsfnK+YXATtyEPamudVkaLmHqNFcJhaegvqivTgVcXqOCLvOqDnpchtSjdnZ0terGMA0c+ccqr5+QEDGxCuDbdHNIJr8fvOc+P+1JDDRPvkFwNfj/hAoFJA4uA2hE6CKu9TNybJznceEwwZ1ngHdG3ItSWHlNKyXQved4hm5AmwYxbttTlvd1UF0N6pi8jPn/zy1P3q+S9mna3rdCBomLTMFkLjzSubnXDoGiJlehTOuUEw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=quantenna.com; dmarc=pass action=none header.from=quantenna.com; dkim=pass header.d=quantenna.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quantenna.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iR/oM1NzOx5iOo2BWN21xzuO/3uXpVKzQI1vf+g09BY=; b=ktfQ2F96pgoDXaCW0ayNpbeolxgD8qRjTft6U5Qb5YpGyJSrq68wiA4rGMQtHRVnGYRMf7yIPP4TWinsqNZcvBCTvADYDv2azX/ZQOEur2Pn4THV3AsosETdh0dMm8nfTruUv8R5O/i3u9HTpUbHurBcXQBOvO3PjfbSuojhSl8= Received: from SN6PR05MB4686.namprd05.prod.outlook.com (52.135.114.208) by SN6PR05MB5039.namprd05.prod.outlook.com (20.177.249.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.16; Thu, 13 Feb 2020 08:54:45 +0000 Received: from SN6PR05MB4686.namprd05.prod.outlook.com ([fe80::5585:dabd:89cf:b48d]) by SN6PR05MB4686.namprd05.prod.outlook.com ([fe80::5585:dabd:89cf:b48d%3]) with mapi id 15.20.2750.007; Thu, 13 Feb 2020 08:54:45 +0000 Received: from SN6PR05MB4928.namprd05.prod.outlook.com (52.135.117.74) by SN6PR05MB5662.namprd05.prod.outlook.com (52.135.110.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2750.8; Thu, 13 Feb 2020 08:51:23 +0000 Received: from SN6PR05MB4928.namprd05.prod.outlook.com ([fe80::25b7:98a0:c066:1a9]) by SN6PR05MB4928.namprd05.prod.outlook.com ([fe80::25b7:98a0:c066:1a9%6]) with mapi id 15.20.2729.021; Thu, 13 Feb 2020 08:51:23 +0000 Received: from bars.quantenna.com (195.182.157.78) by LO2P265CA0075.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.22 via Frontend Transport; Thu, 13 Feb 2020 08:51:22 +0000 From: Sergey Matyukevich To: "hostap@lists.infradead.org" Subject: [PATCH 2/3] OWE: rename owe_assoc_req_process parameter reason to status Thread-Topic: [PATCH 2/3] OWE: rename owe_assoc_req_process parameter reason to status Thread-Index: AQHV4krE9W/tgCPD+0Swyt0GeIgpdw== Date: Thu, 13 Feb 2020 08:51:23 +0000 Message-ID: <20200213085112.27376-3-sergey.matyukevich.os@quantenna.com> References: <20200213085112.27376-1-sergey.matyukevich.os@quantenna.com> In-Reply-To: <20200213085112.27376-1-sergey.matyukevich.os@quantenna.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: LO2P265CA0075.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8::15) To SN6PR05MB4928.namprd05.prod.outlook.com (2603:10b6:805:9d::10) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.11.0 x-originating-ip: [195.182.157.78] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2a813576-74c2-498c-9846-08d7b061e6ec x-ms-traffictypediagnostic: SN6PR05MB5662:|SN6PR05MB5039: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-moderation-data: 2/13/2020 8:54:42 AM x-ms-oob-tlc-oobclassifiers: OLM:2803; x-forefront-prvs: 031257FE13 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(39850400004)(346002)(376002)(136003)(366004)(189003)(199004)(64756008)(2906002)(66446008)(7696005)(2616005)(186003)(66556008)(956004)(478600001)(26005)(4326008)(5660300002)(6916009)(107886003)(52116002)(66476007)(66946007)(316002)(16526019)(86362001)(81156014)(103116003)(36756003)(81166006)(71200400001)(8676002)(1076003)(8936002)(6486002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR05MB5039; H:SN6PR05MB4686.namprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: quantenna.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: iwSKE0k3FeQulHosVd7VQ6QpHHSDH6hMrJK7vTAR6/oKxMhXbYNaA8PXV9KBt0cq8RGTJbRvk2dNw0myYrUSd5KaBZGx6iIe6OJ3bMeHVVg7wPqcPerd67UkZjzf9/b1vxqnFHpACPIveozgDRzYOp0lfMNVJB6BYOq134ZVZUGh9WSCQ9qc2wZEwMD/6vykx/D2YTKYWHyFcmD4xvmQsIaUJ842bhiuptTC3L750bQ/nyeANKZhuDfkH5IgRV2TRUVsqp4XelW1CJQW+Oy+hMxPiJPT9jRfs+xBxVQ1qM+r+ExORCGf3pPFBJREzqAQR4OOhZpbsC9uRtoVkum7Tfmr0Hf7c8eH4jUVw4zFLRZpZA8//oh5uV0dfjCq9RzuTCBSc9EMNhkO0CpnhzlQpk+aKMlLb8kkuzd76tA2hqcSqjMdyBIdnxSmsuv6GDOI x-ms-exchange-antispam-messagedata: 54pEkOxRTlis0XLFwg7jmOWdInuFldVD5pMkA6dQGAvKxTq7bfplxkjSjrdRcpGTHd6f7Lo6h/JURlnZfiKWNN7CTjwt8LFRE91xEfdQgnkNG+mNViVB9L5+Spo43adCS4qgTnJIARh90vHaklSEDQ== MIME-Version: 1.0 X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2a813576-74c2-498c-9846-08d7b061e6ec X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Q0YJud5YFMsN5eVwRhCOx7o2p4XnGjkzV4AXhB69Z5SKIB0SgBJZoA9xaaH1/J8Yu+oGoAkpGwFOaxqXZM6KguRPuaGdRXHgp87IRVV08ZH3gt5/BUTmhd/hu/GVYNI4jxo9E+5peb+/YH/VTliIMg== X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Feb 2020 08:54:45.3643 (UTC) X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR05MB5039 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572 definitions=2020-02-13_01:2020-02-12, 2020-02-13 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 lowpriorityscore=0 phishscore=0 mlxlogscore=999 impostorscore=0 clxscore=1015 mlxscore=0 suspectscore=0 priorityscore=1501 spamscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002130071 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200213_005448_215480_91018A03 X-CRM114-Status: GOOD ( 11.85 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [67.231.157.42 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_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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 X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sergey Matyukevich Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org In the function owe_assoc_req_process, values assigned to reason argument imply that it should be renamed to status. Rename 'reason' to 'status' and modify the uses of owe_assoc_req_process accordingly. Signed-off-by: Sergey Matyukevich --- src/ap/drv_callbacks.c | 8 ++++---- src/ap/ieee802_11.c | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c index fdd845573..38506a097 100644 --- a/src/ap/drv_callbacks.c +++ b/src/ap/drv_callbacks.c @@ -577,18 +577,18 @@ skip_wpa_check: npos = owe_assoc_req_process(hapd, sta, elems.owe_dh, elems.owe_dh_len, p, sizeof(buf) - (p - buf), - &reason); + &status); if (npos) p = npos; + if (!npos && - reason == WLAN_STATUS_FINITE_CYCLIC_GROUP_NOT_SUPPORTED) { - status = WLAN_STATUS_FINITE_CYCLIC_GROUP_NOT_SUPPORTED; + status == WLAN_STATUS_FINITE_CYCLIC_GROUP_NOT_SUPPORTED) { hostapd_sta_assoc(hapd, addr, reassoc, status, buf, p - buf); return 0; } - if (!npos || reason != WLAN_STATUS_SUCCESS) + if (!npos || status != WLAN_STATUS_SUCCESS) goto fail; } #endif /* CONFIG_OWE */ diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 625e10b4b..68fdba4e0 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -3951,12 +3951,12 @@ done: #ifdef CONFIG_OWE u8 * owe_assoc_req_process(struct hostapd_data *hapd, struct sta_info *sta, const u8 *owe_dh, u8 owe_dh_len, - u8 *owe_buf, size_t owe_buf_len, u16 *reason) + u8 *owe_buf, size_t owe_buf_len, u16 *status) { #ifdef CONFIG_TESTING_OPTIONS if (hapd->conf->own_ie_override) { wpa_printf(MSG_DEBUG, "OWE: Using IE override"); - *reason = WLAN_STATUS_SUCCESS; + *status = WLAN_STATUS_SUCCESS; return wpa_auth_write_assoc_resp_owe(sta->wpa_sm, owe_buf, owe_buf_len, NULL, 0); } @@ -3966,18 +3966,18 @@ u8 * owe_assoc_req_process(struct hostapd_data *hapd, struct sta_info *sta, wpa_printf(MSG_DEBUG, "OWE: Using PMKSA caching"); owe_buf = wpa_auth_write_assoc_resp_owe(sta->wpa_sm, owe_buf, owe_buf_len, NULL, 0); - *reason = WLAN_STATUS_SUCCESS; + *status = WLAN_STATUS_SUCCESS; return owe_buf; } if (sta->owe_pmk && sta->external_dh_updated) { wpa_printf(MSG_DEBUG, "OWE: Using previously derived PMK"); - *reason = WLAN_STATUS_SUCCESS; + *status = WLAN_STATUS_SUCCESS; return owe_buf; } - *reason = owe_process_assoc_req(hapd, sta, owe_dh, owe_dh_len); - if (*reason != WLAN_STATUS_SUCCESS) + *status = owe_process_assoc_req(hapd, sta, owe_dh, owe_dh_len); + if (*status != WLAN_STATUS_SUCCESS) return NULL; owe_buf = wpa_auth_write_assoc_resp_owe(sta->wpa_sm, owe_buf, @@ -3988,7 +3988,7 @@ u8 * owe_assoc_req_process(struct hostapd_data *hapd, struct sta_info *sta, pub = crypto_ecdh_get_pubkey(sta->owe_ecdh, 0); if (!pub) { - *reason = WLAN_STATUS_UNSPECIFIED_FAILURE; + *status = WLAN_STATUS_UNSPECIFIED_FAILURE; return owe_buf; }