From patchwork Thu Jul 1 07:05:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arowa Suliman X-Patchwork-Id: 1499397 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; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=im1MKMT8; 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=PrSgDyOF; 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 4GFq7t15yWz9sVb for ; Thu, 1 Jul 2021 17:08:58 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FcdqYueUP8LqcnYx4fCMAyw10FzNgv4xaf/bloIWnx4=; b=im1MKMT8JdkT2K dx1UA6mJ73nOtNaRIGgZ2Maj7fWp+Snhq+B2txW1OB3B1fZUaJHfQ1RNSRgtfw8rb4++iJeNR9uTz lckmuHiWvLDZeYzei2p2C1DdamC3PluZfB0jQT8D1p59MRzCHteGLS8IO3mqHJ7g0fWewgN76kFkl oUMhdJKYcj3NEtbBqIkFAJ3sZ8b49IGqFvDFcZBf+AwMr1IfP8buhmuCFap1nezC0aqOKIyhx/jul p/VtuMNgnCZtUyDZvyms0aTCPuo4HQDHufCwvFpGR4Grc1j+NQ2CVSHNZ9EG7QKX5bDiNm8OKFaoM uRRe/qfR24QqnE3HUlVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyqmv-00GL5o-OA; Thu, 01 Jul 2021 07:07:05 +0000 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyqlf-00GKen-4U for hostap@lists.infradead.org; Thu, 01 Jul 2021 07:05:50 +0000 Received: by mail-pg1-x52a.google.com with SMTP id h4so5244354pgp.5 for ; Thu, 01 Jul 2021 00:05:46 -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=8MR00xbsBOL5omUAIvAkbsB5hdMeXSD0eYwci+cAmr0=; b=PrSgDyOF+VSW5p21z/DEZuk6VmRnQ5ILH0B2x4r+cz+YaLI9B9KJVnIA153WE9sw4E plWBYAOjRgGyzev966WB8DTuIe+Fc1GU+FhBfdDJsm6AdEcosRaW7Dh9/jQBpwKUyfst Y0guYGviX45WHNkl3Ze+nez4iIxSJOLdBVdyc= 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=8MR00xbsBOL5omUAIvAkbsB5hdMeXSD0eYwci+cAmr0=; b=WKKG6N1ldRQP6P/rfS1zxeCervsQCo5lXSjpA3TKX+6hCIgB9cxeGEOcN0lRLvkoJ5 Nbnr6U1FZyLV5iu5j/TzH92F8qFSiijDKB0qbYIbUO8EuUjyZXVwJwxQeurFg1AlEBD1 V3i18qgHg3XZ0bG0eRTO3sXKY7FtitLTbhe5UHcl2M+7OVxKAX21D/tcyKklwkqwLLqQ J1UKfxYoLtDASmSpBKajhkajQf7YaoBUnHCfQeaXyUKlu+EMiINjaEoK44aH8kDneni9 9c8U+TJETkH1Ld5eBxPtvwcBCsIydcIGDMrHwizcMbyovLpjO3+46xGeHQzX85LcDRrC 5h/Q== X-Gm-Message-State: AOAM531KUXsWI4AEN9A6uSJTk3KfGf7g8kBWsDullROkNkHECMcKhqf/ fyZAwdTFp9Oj+F7PxxPipUasdK9lSoshig== X-Google-Smtp-Source: ABdhPJwBkw8gCjXnLbsFaMGQLFUjFw0wn2ra10CQxEcG0p8VpeJIN+ISqNgVDa78LZNVR+flOE/iPw== X-Received: by 2002:a62:7c4e:0:b029:308:4adf:8d3a with SMTP id x75-20020a627c4e0000b02903084adf8d3amr37931365pfc.4.1625123145755; Thu, 01 Jul 2021 00:05:45 -0700 (PDT) Received: from arowa.mtv.corp.google.com ([2620:15c:202:201:9646:c9f5:3197:bfb6]) by smtp.gmail.com with ESMTPSA id y6sm24461663pgk.79.2021.07.01.00.05.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jul 2021 00:05:45 -0700 (PDT) From: Arowa Suliman X-Google-Original-From: Arowa Suliman To: hostap@lists.infradead.org Cc: Arowa Suliman , Arowa Suliman Subject: [PATCH v2 7/7] hostapd: Replace Dummy with Stub Part 2. Date: Thu, 1 Jul 2021 00:05:28 -0700 Message-Id: <20210701070528.2125299-8-arowa@google.com> X-Mailer: git-send-email 2.32.0.93.g670b81a890-goog In-Reply-To: <20210701070528.2125299-1-arowa@google.com> References: <20210701070528.2125299-1-arowa@google.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210701_000547_304533_F387CC9B X-CRM114-Status: GOOD ( 24.37 ) X-Spam-Score: -0.4 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Replaced the word dummy with the inclusive word Stub. Signed-off-by: Arowa Suliman --- doc/code_structure.doxygen | 2 +- hostapd/ctrl_iface.c | 10 ++-- hostapd/hlr_auc_gw.milenage_db | 2 +- hostapd/hostapd_cli.c | 2 +- src/eap_server [...] Content analysis details: (-0.4 points, 5.0 required) 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:52a 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_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Replaced the word dummy with the inclusive word Stub. Signed-off-by: Arowa Suliman --- doc/code_structure.doxygen | 2 +- hostapd/ctrl_iface.c | 10 ++-- hostapd/hlr_auc_gw.milenage_db | 2 +- hostapd/hostapd_cli.c | 2 +- src/eap_server/eap_tls_common.h | 2 +- src/wps/wps.c | 2 +- src/wps/wps_defs.h | 2 +- src/wps/wps_registrar.c | 26 +++++----- src/wps/wps_upnp.c | 2 +- tests/hwsim/auth_serv/hlr_auc_gw.milenage_db | 2 +- tests/hwsim/multi-bss-iface-per_sta_vif.conf | 4 +- tests/hwsim/multi-bss-iface.conf | 4 +- tests/hwsim/test_ap_vlan.py | 54 ++++++++++---------- tests/hwsim/test_ap_wps.py | 16 +++--- tests/hwsim/test_p2p_autogo.py | 2 +- tests/hwsim/vm/inside.sh | 2 +- tests/hwsim/vm/kernel-config | 2 +- tests/hwsim/vm/kernel-config.uml | 2 +- wpa_supplicant/config_none.c | 2 +- wpa_supplicant/ctrl_iface.c | 10 ++-- wpa_supplicant/preauth_test.c | 6 +-- 21 files changed, 78 insertions(+), 78 deletions(-) diff --git a/doc/code_structure.doxygen b/doc/code_structure.doxygen index ff11506fa..c7ed5c71a 100644 --- a/doc/code_structure.doxygen +++ b/doc/code_structure.doxygen @@ -130,7 +130,7 @@ with with hostapd. The following C files are currently used: Definition of TLS library wrapper \ref tls_none.c - Dummy implementation of TLS library wrapper for cases where TLS + Stub implementation of TLS library wrapper for cases where TLS functionality is not included. \ref tls_openssl.c diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c index 4a2d60627..280e94fec 100644 --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c @@ -1455,10 +1455,10 @@ static int hostapd_ctrl_iface_set(struct hostapd_data *hapd, char *cmd) wps_version_number & 0x0f); hostapd_wps_update_ie(hapd); } - } else if (os_strcasecmp(cmd, "wps_testing_dummy_cred") == 0) { - wps_testing_dummy_cred = atoi(value); - wpa_printf(MSG_DEBUG, "WPS: Testing - dummy_cred=%d", - wps_testing_dummy_cred); + } else if (os_strcasecmp(cmd, "wps_testing_stub_cred") == 0) { + wps_testing_stub_cred = atoi(value); + wpa_printf(MSG_DEBUG, "WPS: Testing - stub_cred=%d", + wps_testing_stub_cred); } else if (os_strcasecmp(cmd, "wps_corrupt_pkhash") == 0) { wps_corrupt_pkhash = atoi(value); wpa_printf(MSG_DEBUG, "WPS: Testing - wps_corrupt_pkhash=%d", @@ -4470,7 +4470,7 @@ static void hostapd_ctrl_iface_flush(struct hapd_interfaces *interfaces) { #ifdef CONFIG_WPS_TESTING wps_version_number = 0x20; - wps_testing_dummy_cred = 0; + wps_testing_stub_cred = 0; wps_corrupt_pkhash = 0; #endif /* CONFIG_WPS_TESTING */ diff --git a/hostapd/hlr_auc_gw.milenage_db b/hostapd/hlr_auc_gw.milenage_db index c156a29ae..a25065310 100644 --- a/hostapd/hlr_auc_gw.milenage_db +++ b/hostapd/hlr_auc_gw.milenage_db @@ -3,7 +3,7 @@ # 4.3.20 Test Set 20. SQN is the last used SQN value. # These values can be used for both UMTS (EAP-AKA) and GSM (EAP-SIM) # authentication. In case of GSM/EAP-SIM, AMF and SQN values are not used, but -# dummy values will need to be included in this file. +# stub values will need to be included in this file. # IMSI Ki OPc AMF SQN [RES_len] 232010000000000 90dca4eda45b53cf0f12d7c9c3bc6a89 cb9cccc4b9258e6dca4760379fb82581 61df 000000000000 diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c index eaa628ad0..0e7fdd6bc 100644 --- a/hostapd/hostapd_cli.c +++ b/hostapd/hostapd_cli.c @@ -1048,7 +1048,7 @@ static char ** hostapd_complete_set(const char *str, int pos) int arg = get_cmd_arg_num(str, pos); const char *fields[] = { #ifdef CONFIG_WPS_TESTING - "wps_version_number", "wps_testing_dummy_cred", + "wps_version_number", "wps_testing_stub_cred", "wps_corrupt_pkhash", #endif /* CONFIG_WPS_TESTING */ #ifdef CONFIG_INTERWORKING diff --git a/src/eap_server/eap_tls_common.h b/src/eap_server/eap_tls_common.h index b0b736123..b0723a1fa 100644 --- a/src/eap_server/eap_tls_common.h +++ b/src/eap_server/eap_tls_common.h @@ -68,7 +68,7 @@ struct eap_ssl_data { /* could be up to 128 bytes, but only the first 64 bytes are used */ #define EAP_TLS_KEY_LEN 64 -/* dummy type used as a flag for UNAUTH-TLS */ +/* stub type used as a flag for UNAUTH-TLS */ #define EAP_UNAUTH_TLS_TYPE 255 #define EAP_WFA_UNAUTH_TLS_TYPE 254 diff --git a/src/wps/wps.c b/src/wps/wps.c index 484df262c..1fe38063b 100644 --- a/src/wps/wps.c +++ b/src/wps/wps.c @@ -17,7 +17,7 @@ #ifdef CONFIG_WPS_TESTING int wps_version_number = 0x20; -int wps_testing_dummy_cred = 0; +int wps_testing_stub_cred = 0; int wps_corrupt_pkhash = 0; int wps_force_auth_types_in_use = 0; u16 wps_force_auth_types = 0; diff --git a/src/wps/wps_defs.h b/src/wps/wps_defs.h index 9fccb4eeb..ddaeda56d 100644 --- a/src/wps/wps_defs.h +++ b/src/wps/wps_defs.h @@ -12,7 +12,7 @@ #ifdef CONFIG_WPS_TESTING extern int wps_version_number; -extern int wps_testing_dummy_cred; +extern int wps_testing_stub_cred; extern int wps_corrupt_pkhash; extern int wps_force_auth_types_in_use; extern u16 wps_force_auth_types; diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c index 173fbbd68..9587293d0 100644 --- a/src/wps/wps_registrar.c +++ b/src/wps/wps_registrar.c @@ -1785,23 +1785,23 @@ int wps_build_cred(struct wps_data *wps, struct wpabuf *msg) use_provided: #ifdef CONFIG_WPS_TESTING - if (wps_testing_dummy_cred) + if (wps_testing_stub_cred) cred = wpabuf_alloc(200); else cred = NULL; if (cred) { - struct wps_credential dummy; - wpa_printf(MSG_DEBUG, "WPS: Add dummy credential"); - os_memset(&dummy, 0, sizeof(dummy)); - os_memcpy(dummy.ssid, "dummy", 5); - dummy.ssid_len = 5; - dummy.auth_type = WPS_AUTH_WPA2PSK; - dummy.encr_type = WPS_ENCR_AES; - os_memcpy(dummy.key, "dummy psk", 9); - dummy.key_len = 9; - os_memcpy(dummy.mac_addr, wps->mac_addr_e, ETH_ALEN); - wps_build_credential(cred, &dummy); - wpa_hexdump_buf(MSG_DEBUG, "WPS: Dummy Credential", cred); + struct wps_credential stub; + wpa_printf(MSG_DEBUG, "WPS: Add stub credential"); + os_memset(&stub, 0, sizeof(stub)); + os_memcpy(stub.ssid, "stub", 5); + stub.ssid_len = 5; + stub.auth_type = WPS_AUTH_WPA2PSK; + stub.encr_type = WPS_ENCR_AES; + os_memcpy(stub.key, "stub psk", 9); + stub.key_len = 9; + os_memcpy(stub.mac_addr, wps->mac_addr_e, ETH_ALEN); + wps_build_credential(cred, &stub); + wpa_hexdump_buf(MSG_DEBUG, "WPS: Stub Credential", cred); wpabuf_put_be16(msg, ATTR_CRED); wpabuf_put_be16(msg, wpabuf_len(cred)); diff --git a/src/wps/wps_upnp.c b/src/wps/wps_upnp.c index ff58cb938..05bb9c585 100644 --- a/src/wps/wps_upnp.c +++ b/src/wps/wps_upnp.c @@ -658,7 +658,7 @@ static int subscription_first_event(struct subscription *s) /* * There has been no events before the subscription. However, * UPnP device architecture specification requires all the - * evented variables to be included, so generate a dummy event + * evented variables to be included, so generate a stub event * for this particular case using a WSC_ACK and all-zeros * nonces. The ER (UPnP control point) will ignore this, but at * least it will learn that WLANEvent variable will be used in diff --git a/tests/hwsim/auth_serv/hlr_auc_gw.milenage_db b/tests/hwsim/auth_serv/hlr_auc_gw.milenage_db index 1c494f773..fefe5145f 100644 --- a/tests/hwsim/auth_serv/hlr_auc_gw.milenage_db +++ b/tests/hwsim/auth_serv/hlr_auc_gw.milenage_db @@ -3,7 +3,7 @@ # 4.3.20 Test Set 20. SQN is the last used SQN value. # These values can be used for both UMTS (EAP-AKA) and GSM (EAP-SIM) # authentication. In case of GSM/EAP-SIM, AMF and SQN values are not used, but -# dummy values will need to be included in this file. +# stub values will need to be included in this file. # IMSI Ki OPc AMF SQN 232010000000000 90dca4eda45b53cf0f12d7c9c3bc6a89 cb9cccc4b9258e6dca4760379fb82581 61df 000000000000 diff --git a/tests/hwsim/multi-bss-iface-per_sta_vif.conf b/tests/hwsim/multi-bss-iface-per_sta_vif.conf index f07c13b21..874cb0771 100644 --- a/tests/hwsim/multi-bss-iface-per_sta_vif.conf +++ b/tests/hwsim/multi-bss-iface-per_sta_vif.conf @@ -9,7 +9,7 @@ ctrl_interface=/var/run/hostapd ssid=bss-1 dynamic_vlan=1 -vlan_tagged_interface=dummy0 +vlan_tagged_interface=stub0 vlan_bridge=brvlan wpa=2 wpa_key_mgmt=WPA-EAP @@ -28,7 +28,7 @@ ctrl_interface=/var/run/hostapd ssid=bss-2 dynamic_vlan=1 -vlan_tagged_interface=dummy0 +vlan_tagged_interface=stub0 vlan_bridge=brvlan wpa=2 wpa_key_mgmt=WPA-EAP diff --git a/tests/hwsim/multi-bss-iface.conf b/tests/hwsim/multi-bss-iface.conf index 6b6167f51..5370352c9 100644 --- a/tests/hwsim/multi-bss-iface.conf +++ b/tests/hwsim/multi-bss-iface.conf @@ -9,7 +9,7 @@ ctrl_interface=/var/run/hostapd ssid=bss-1 dynamic_vlan=1 -vlan_tagged_interface=dummy0 +vlan_tagged_interface=stub0 vlan_bridge=brvlan wpa=2 wpa_key_mgmt=WPA-EAP @@ -27,7 +27,7 @@ ctrl_interface=/var/run/hostapd ssid=bss-2 dynamic_vlan=1 -vlan_tagged_interface=dummy0 +vlan_tagged_interface=stub0 vlan_bridge=brvlan wpa=2 wpa_key_mgmt=WPA-EAP diff --git a/tests/hwsim/test_ap_vlan.py b/tests/hwsim/test_ap_vlan.py index 29f8f5322..ef0e9fd7f 100644 --- a/tests/hwsim/test_ap_vlan.py +++ b/tests/hwsim/test_ap_vlan.py @@ -378,41 +378,41 @@ def test_ap_vlan_tagged(dev, apdev): os.unlink(filename) def ap_vlan_iface_cleanup_multibss_cleanup(): - subprocess.call(['ifconfig', 'dummy0', 'down'], + subprocess.call(['ifconfig', 'stub0', 'down'], stderr=open('/dev/null', 'w')) - ifnames = ['wlan3.1', 'wlan3.2', 'wlan3-2.1', 'wlan3-2.2', 'dummy0.2', - 'dummy0.1', 'dummy0', 'brvlan1', 'brvlan2'] + ifnames = ['wlan3.1', 'wlan3.2', 'wlan3-2.1', 'wlan3-2.2', 'stub0.2', + 'stub0.1', 'stub0', 'brvlan1', 'brvlan2'] for ifname in ifnames: subprocess.call(['ip', 'link', 'del', ifname], stderr=open('/dev/null', 'w')) def ap_vlan_iface_test_and_prepare_environ(): ifaces = netifaces.interfaces() - if "dummy0" in ifaces: - raise Exception("dummy0 already exists before") + if "stub0" in ifaces: + raise Exception("stub0 already exists before") ifaces = netifaces.interfaces() - if "dummy0.1" in ifaces: - raise Exception("dummy0.1 already exists before") + if "stub0.1" in ifaces: + raise Exception("stub0.1 already exists before") - subprocess.call(['ip', 'link', 'add', 'dummy0', 'type', 'dummy']) - subprocess.call(['ifconfig', 'dummy0', 'up']) + subprocess.call(['ip', 'link', 'add', 'stub0', 'type', 'stub']) + subprocess.call(['ifconfig', 'stub0', 'up']) ifaces = netifaces.interfaces() - if "dummy0" not in ifaces: - raise HwsimSkip("failed to add dummy0 - missing kernel config DUMMY ?") + if "stub0" not in ifaces: + raise HwsimSkip("failed to add stub0 - missing kernel config DUMMY ?") - subprocess.call(['ip', 'link', 'add', 'link', 'dummy0', 'name', 'dummy0.1', + subprocess.call(['ip', 'link', 'add', 'link', 'stub0', 'name', 'stub0.1', 'type', 'vlan', 'id', '1']) ifaces = netifaces.interfaces() - if "dummy0.1" not in ifaces: - raise HwsimSkip("failed to add dummy0.1 - missing kernel config VLAN_8021Q ?") + if "stub0.1" not in ifaces: + raise HwsimSkip("failed to add stub0.1 - missing kernel config VLAN_8021Q ?") - subprocess.call(['ip', 'link', 'del', 'dummy0.1']) + subprocess.call(['ip', 'link', 'del', 'stub0.1']) ifaces = netifaces.interfaces() - if "dummy0.1" in ifaces: - raise Exception("dummy0.1 was not removed before testing") + if "stub0.1" in ifaces: + raise Exception("stub0.1 was not removed before testing") def test_ap_vlan_iface_cleanup_multibss(dev, apdev): """AP VLAN operation in multi-BSS multi-VLAN case""" @@ -464,8 +464,8 @@ def ap_vlan_iface_cleanup_multibss(dev, apdev, cfgfile): raise Exception("bridge brvlan1 was not created") hwsim_utils.test_connectivity_iface(dev[0], hapd, "brvlan1") - if not iface_is_in_bridge("brvlan1", "dummy0.1"): - raise Exception("dummy0.1 not in brvlan1") + if not iface_is_in_bridge("brvlan1", "stub0.1"): + raise Exception("stub0.1 not in brvlan1") dev[1].connect("bss-2", key_mgmt="WPA-EAP", eap="PAX", identity="vlan1", @@ -474,8 +474,8 @@ def ap_vlan_iface_cleanup_multibss(dev, apdev, cfgfile): hapd1.wait_sta() hwsim_utils.test_connectivity_iface(dev[1], hapd1, "brvlan1") - if not iface_is_in_bridge("brvlan1", "dummy0.1"): - raise Exception("dummy0.1 not in brvlan1") + if not iface_is_in_bridge("brvlan1", "stub0.1"): + raise Exception("stub0.1 not in brvlan1") authserv.disable() authserv.set('eap_user_file', "auth_serv/eap_user_vlan.conf") @@ -502,13 +502,13 @@ def ap_vlan_iface_cleanup_multibss(dev, apdev, cfgfile): hwsim_utils.test_connectivity_iface(dev[0], hapd, "brvlan2", max_tries=5) - if not iface_is_in_bridge("brvlan2", "dummy0.2"): - raise Exception("dummy0.2 not in brvlan2") + if not iface_is_in_bridge("brvlan2", "stub0.2"): + raise Exception("stub0.2 not in brvlan2") logger.info("test wlan1 == VLAN 1") hwsim_utils.test_connectivity_iface(dev[1], hapd1, "brvlan1") - if not iface_is_in_bridge("brvlan1", "dummy0.1"): - raise Exception("dummy0.1 not in brvlan1") + if not iface_is_in_bridge("brvlan1", "stub0.1"): + raise Exception("stub0.1 not in brvlan1") logger.info("wlan1 -> VLAN 2") @@ -530,8 +530,8 @@ def ap_vlan_iface_cleanup_multibss(dev, apdev, cfgfile): logger.info("test wlan0 == VLAN 2") hwsim_utils.test_connectivity_iface(dev[0], hapd, "brvlan2") - if not iface_is_in_bridge("brvlan2", "dummy0.2"): - raise Exception("dummy0.2 not in brvlan2") + if not iface_is_in_bridge("brvlan2", "stub0.2"): + raise Exception("stub0.2 not in brvlan2") ifaces = netifaces.interfaces() if "brvlan1" in ifaces: diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index a07ed60b8..d784af8df 100644 --- a/tests/hwsim/test_ap_wps.py +++ b/tests/hwsim/test_ap_wps.py @@ -5066,14 +5066,14 @@ def _test_ap_wps_http_timeout(dev, apdev): sock.connect(addr) sock.send(b"G") - class DummyServer(StreamRequestHandler): + class StubServer(StreamRequestHandler): def handle(self): - logger.debug("DummyServer - start 31 sec wait") + logger.debug("StubServer - start 31 sec wait") time.sleep(31) - logger.debug("DummyServer - wait done") + logger.debug("StubServer - wait done") logger.debug("Start WPS ER") - server, sock2 = wps_er_start(dev[0], DummyServer, max_age=40, + server, sock2 = wps_er_start(dev[0], StubServer, max_age=40, wait_m_search=True) logger.debug("Start server to accept, but not complete, HTTP connection from WPS ER") @@ -10131,8 +10131,8 @@ def test_ap_wps_tkip(dev, apdev): if "FAIL" not in hapd.request("WPS_PBC"): raise Exception("WPS unexpectedly enabled") -def test_ap_wps_conf_dummy_cred(dev, apdev): - """WPS PIN provisioning with configured AP using dummy cred""" +def test_ap_wps_conf_stub_cred(dev, apdev): + """WPS PIN provisioning with configured AP using stub cred""" ssid = "test-wps-conf" hapd = hostapd.add_ap(apdev[0], {"ssid": ssid, "eap_server": "1", "wps_state": "2", @@ -10142,7 +10142,7 @@ def test_ap_wps_conf_dummy_cred(dev, apdev): dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412") dev[0].dump_monitor() try: - hapd.set("wps_testing_dummy_cred", "1") + hapd.set("wps_testing_stub_cred", "1") dev[0].request("WPS_PIN " + apdev[0]['bssid'] + " 12345670") for i in range(1, 3): ev = dev[0].wait_event(["WPS-CRED-RECEIVED"], timeout=15) @@ -10150,7 +10150,7 @@ def test_ap_wps_conf_dummy_cred(dev, apdev): raise Exception("WPS credential %d not received" % i) dev[0].wait_connected(timeout=30) finally: - hapd.set("wps_testing_dummy_cred", "0") + hapd.set("wps_testing_stub_cred", "0") def test_ap_wps_rf_bands(dev, apdev): """WPS and wps_rf_bands configuration""" diff --git a/tests/hwsim/test_p2p_autogo.py b/tests/hwsim/test_p2p_autogo.py index 91d68eaf2..d857c9025 100644 --- a/tests/hwsim/test_p2p_autogo.py +++ b/tests/hwsim/test_p2p_autogo.py @@ -378,7 +378,7 @@ def test_autogo_chan_switch_group_iface(dev): @remote_compatible def test_autogo_extra_cred(dev): """P2P autonomous GO sending two WPS credentials""" - if "FAIL" in dev[0].request("SET wps_testing_dummy_cred 1"): + if "FAIL" in dev[0].request("SET wps_testing_stub_cred 1"): raise Exception("Failed to enable test mode") autogo(dev[0], freq=2412) connect_cli(dev[0], dev[1], social=True, freq=2412) diff --git a/tests/hwsim/vm/inside.sh b/tests/hwsim/vm/inside.sh index 9d4a933fe..8ba7ce43d 100755 --- a/tests/hwsim/vm/inside.sh +++ b/tests/hwsim/vm/inside.sh @@ -53,7 +53,7 @@ ln -s /proc/self/fd/2 /dev/stderr echo "VM has started up" > /dev/ttyS0 -# create dummy sudo - everything runs as uid 0 +# create stub sudo - everything runs as uid 0 mkdir /tmp/bin cat > /tmp/bin/sudo << EOF #!/bin/bash diff --git a/tests/hwsim/vm/kernel-config b/tests/hwsim/vm/kernel-config index 2aff20af4..ec3d3a8aa 100644 --- a/tests/hwsim/vm/kernel-config +++ b/tests/hwsim/vm/kernel-config @@ -98,7 +98,7 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" # CONFIG_PNP_DEBUG_MESSAGES is not set # CONFIG_BLK_DEV is not set CONFIG_NETDEVICES=y -CONFIG_DUMMY=y +CONFIG_STUB=y CONFIG_MACSEC=y CONFIG_VETH=y # CONFIG_ETHERNET is not set diff --git a/tests/hwsim/vm/kernel-config.uml b/tests/hwsim/vm/kernel-config.uml index b0f2f65ac..f6de9c4d4 100644 --- a/tests/hwsim/vm/kernel-config.uml +++ b/tests/hwsim/vm/kernel-config.uml @@ -84,7 +84,7 @@ CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y CONFIG_BLK_DEV_UBD=y CONFIG_BLK_DEV_LOOP=y -CONFIG_DUMMY=y +CONFIG_STUB=y CONFIG_MACSEC=y CONFIG_VETH=y # CONFIG_ETHERNET is not set diff --git a/wpa_supplicant/config_none.c b/wpa_supplicant/config_none.c index 2aac28fa3..0bc977e39 100644 --- a/wpa_supplicant/config_none.c +++ b/wpa_supplicant/config_none.c @@ -5,7 +5,7 @@ * This software may be distributed under the terms of the BSD license. * See README for more details. * - * This file implements dummy example of a configuration backend. None of the + * This file implements stub example of a configuration backend. None of the * functions are actually implemented so this can be used as a simple * compilation test or a starting point for a new configuration backend. */ diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 2b3243e5a..f4a6c0afd 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -568,10 +568,10 @@ static int wpa_supplicant_ctrl_iface_set(struct wpa_supplicant *wpa_s, (wps_version_number & 0xf0) >> 4, wps_version_number & 0x0f); } - } else if (os_strcasecmp(cmd, "wps_testing_dummy_cred") == 0) { - wps_testing_dummy_cred = atoi(value); - wpa_printf(MSG_DEBUG, "WPS: Testing - dummy_cred=%d", - wps_testing_dummy_cred); + } else if (os_strcasecmp(cmd, "wps_testing_stub_cred") == 0) { + wps_testing_stub_cred = atoi(value); + wpa_printf(MSG_DEBUG, "WPS: Testing - stub_cred=%d", + wps_testing_stub_cred); } else if (os_strcasecmp(cmd, "wps_corrupt_pkhash") == 0) { wps_corrupt_pkhash = atoi(value); wpa_printf(MSG_DEBUG, "WPS: Testing - wps_corrupt_pkhash=%d", @@ -8428,7 +8428,7 @@ static void wpa_supplicant_ctrl_iface_flush(struct wpa_supplicant *wpa_s) #ifdef CONFIG_WPS_TESTING wps_version_number = 0x20; - wps_testing_dummy_cred = 0; + wps_testing_stub_cred = 0; wps_corrupt_pkhash = 0; wps_force_auth_types_in_use = 0; wps_force_encr_types_in_use = 0; diff --git a/wpa_supplicant/preauth_test.c b/wpa_supplicant/preauth_test.c index 97c16fb80..31b55325f 100644 --- a/wpa_supplicant/preauth_test.c +++ b/wpa_supplicant/preauth_test.c @@ -220,7 +220,7 @@ static void eapol_test_poll(void *eloop_ctx, void *timeout_ctx) } -static struct wpa_driver_ops dummy_driver; +static struct wpa_driver_ops stub_driver; static void wpa_init_conf(struct wpa_supplicant *wpa_s, const char *ifname) @@ -228,8 +228,8 @@ static void wpa_init_conf(struct wpa_supplicant *wpa_s, const char *ifname) struct l2_packet_data *l2; struct wpa_sm_ctx *ctx; - os_memset(&dummy_driver, 0, sizeof(dummy_driver)); - wpa_s->driver = &dummy_driver; + os_memset(&stub_driver, 0, sizeof(stub_driver)); + wpa_s->driver = &stub_driver; ctx = os_zalloc(sizeof(*ctx)); assert(ctx != NULL);