From patchwork Tue Jul 14 12:32:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Yartys X-Patchwork-Id: 1328835 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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=J/8lq5+k; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=SR1S73Ft; 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 4B5g25297Rz9sQt for ; Tue, 14 Jul 2020 22:34:37 +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=OLGTISG/nW3tYhnRFuQWKfUG/1R2LCRTa+fh6pPE56I=; b=J/8lq5+k4qvRzjiKWYbaNkasO ieS17fUeESNHJJ36OlziWoUYoIrx1LGcj2F9MjM6Lf/ST5vC5lQCa9Lo3WSj0/48ilEq01lhHHCy9 T+kGLdLBLTdtnCYY7gjhsPlCeZvjlK9pPFcVTDNlM6QMaImRzKyw3Kx5ljLcwQCv9zjgEG4ud3RDX qeF1d6SX+mL+VGYXgNpN6JgoI6DNEZ0UnvQW/5SQ08KIMpondSmryBglx8+BInMpBrg1b7N4E+0+N /D7ogjZDUQsa/tPM1R+eKpKSzh/cZQpB83PL73PDa/cYqQZ8VSWb4U9mIhrSOrM3y3DnRxnfwDdZs mu9VdvpUg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvK7j-0001Vk-0T; Tue, 14 Jul 2020 12:33:27 +0000 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvK7g-0001Uy-3G for openwrt-devel@lists.openwrt.org; Tue, 14 Jul 2020 12:33:24 +0000 Received: by mail-lj1-x241.google.com with SMTP id q4so22420390lji.2 for ; Tue, 14 Jul 2020 05:33:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=W1sKkhVs3r74kheg0viLfOW1V6cJdt+KyiaHsHfba8U=; b=SR1S73Ft1SDI7uQmiU5XIerlqc+0B+OrkeizvgqJf3fEoWK97lSNhP0zr1CFoGqa/B eLjme9bEC1eXcteQMdpFhhLvi91oQbKl2dvTcjCLKBFXNa+A5WuE2zeD7JiEx4enYt20 ZynJXAAqCORdre05/brFoAFlsy2hPzFHKbjBfFKIFCm2xho5NKgc91/Crs1vgN3CauF7 wDGpps4PRkPHRk1IEC1JdS6mmrCPCK67rrbmFU3LJ6cp6rfGFYCCMWgzOPtAvEs4Ztx3 U2WNWcWZQes/8UpAPU9YzCLRMpP4J60X9VPmxTiuuueiFA2oBG52HtunNhpKTm3BqUo6 qcIg== 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=W1sKkhVs3r74kheg0viLfOW1V6cJdt+KyiaHsHfba8U=; b=qyAszf7OKmSeemHY17p+ZL0QoF4aBYqFK5wJdOwvuQjGQDNbP9GLDVBftBSKN3pp9i ocScsqQVp16RmmV6DOhLQSaZQZlF2kpjIOKbxexI0GCZDEtpublX+8m+cFzCUlrMylmR c6nFnIrJPC1RsNucJ5JMCAXILRku7mpf03Q8lP1M56TW2Of+lEhroyK8UspIHI0HUSpc /BgFe1R2TEA7tDnNBrlGcRjOwIffHdxLcE2owSFDrUvVq1nEFj39Q153M0mlXgd1f5hu 7EP1Qfg0VhXwvuPXqt0qlNNTWoIzjEmHHI9xd0kI9X6zEZNEpZMBFfh9eyWgsNGFFpc6 IO5g== X-Gm-Message-State: AOAM531aNYJi8kXUE4CL9nNE07eC26WiIZA1zHjpeAs6VOHK9yEzchSM zoBs9yH9Dk6ai1pHbmTUvg+LPT0vB/4= X-Google-Smtp-Source: ABdhPJwPWQo/BE3TJ5BGycq7JjWx+18dMWyiaE8eL81D1mhkl7uoSXHpBSr36ciPt4ZW2EuIW4o/Qw== X-Received: by 2002:a05:651c:2da:: with SMTP id f26mr2068326ljo.377.1594730001907; Tue, 14 Jul 2020 05:33:21 -0700 (PDT) Received: from frog.lan ([2a01:799:10df:4000:e70:1b7d:12fb:1c30]) by smtp.gmail.com with ESMTPSA id b11sm5256776lfa.50.2020.07.14.05.33.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 05:33:21 -0700 (PDT) From: Michael Yartys To: openwrt-devel@lists.openwrt.org Subject: [RFC PATCH 1/2] hostapd: split auth_cache into individual components Date: Tue, 14 Jul 2020 14:32:33 +0200 Message-Id: <20200714123234.569332-2-michael.yartys@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200714123234.569332-1-michael.yartys@gmail.com> References: <20200714123234.569332-1-michael.yartys@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200714_083324_184010_6D1DFC8E X-CRM114-Status: UNSURE ( 8.10 ) X-CRM114-Notice: Please train this message. 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 [2a00:1450:4864:20:0:0:0:241 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [michael.yartys[at]gmail.com] -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 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Yartys Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Split auth_cache into pmksa_cache (PMKSA caching) and okc (Opportunistic Key Caching) to enable setting these options individually. Signed-off-by: Michael Yartys --- .../network/services/hostapd/files/hostapd.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index f4e2aa559c..644bad2a62 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -191,7 +191,7 @@ hostapd_common_add_bss_config() { config_add_boolean tdls_prohibit - config_add_boolean rsn_preauth auth_cache + config_add_boolean rsn_preauth pmksa_cache okc config_add_int ieee80211w config_add_int eapol_version @@ -308,7 +308,7 @@ hostapd_set_bss_options() { json_get_vars \ wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey wpa_strict_rekey \ wpa_disable_eapol_key_retries tdls_prohibit \ - maxassoc max_inactivity disassoc_low_ack isolate auth_cache \ + maxassoc max_inactivity disassoc_low_ack isolate pmksa_cache okc \ wps_pushbutton wps_label ext_registrar wps_pbc_in_m1 wps_ap_setup_locked \ wps_independent wps_device_type wps_device_name wps_manufacturer wps_pin \ macfilter ssid utf8_ssid wmm uapsd hidden short_preamble rsn_preauth \ @@ -609,22 +609,25 @@ hostapd_set_bss_options() { if [ "$wpa" -ge "2" ]; then if [ -n "$network_bridge" -a "$rsn_preauth" = 1 ]; then - set_default auth_cache 1 + set_default pmksa_cache 1 + set_default okc 1 append bss_conf "rsn_preauth=1" "$N" append bss_conf "rsn_preauth_interfaces=$network_bridge" "$N" else case "$auth_type" in sae|psk-sae|owe) - set_default auth_cache 1 + set_default pmksa_cache 1 + set_default okc 1 ;; *) - set_default auth_cache 0 + set_default pmksa_cache 0 + set_default okc 0 ;; esac fi - append bss_conf "okc=$auth_cache" "$N" - [ "$auth_cache" = 0 ] && append bss_conf "disable_pmksa_caching=1" "$N" + append bss_conf "okc=$okc" "$N" + [ "$pmksa_cache" = 0 ] && append bss_conf "disable_pmksa_caching=1" "$N" # RSN -> allow management frame protection case "$ieee80211w" in From patchwork Tue Jul 14 12:32:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Yartys X-Patchwork-Id: 1328834 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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=28NyFkRD; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=GB/ojmXx; 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 4B5g2554BXz9sRR for ; Tue, 14 Jul 2020 22:34:37 +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=ZdW29HgMesvpz2GRDSzgSf0k8J4iR04PuYGOKmptXkQ=; b=28NyFkRD6idLMbLqxO1jwRk9Q mJfiSsTiPmxwUniqkcknWM0IcEefrH0194NRwxn8Ft72UtazhYlXUD/x9j6YHc/zLvitago0s3Cf1 ch0+T6eMhxvI8BSObN9qEj0Iz2JTtEi7zOQl4qetMe+hrPIAwQcGGOtpZ88xxVBz9ENQGHYM0g1z8 YWz3+LnykL/YlljlyekOrNtsBYSfIFBjqYuVdNNKVOsmo/aDWYtJTKIj5E+JBea4Y8Y1BcEP2Fi5e 4QrR/0FG/VPXFoz/fogrAm9/rjMAwI6CJ/Itcc3EhrjPSGSCcF2DwascCWqubkzMbavRqWBhA9zfH X/It1eCGw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvK7l-0001WW-7D; Tue, 14 Jul 2020 12:33:29 +0000 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvK7j-0001Vb-6O for openwrt-devel@lists.openwrt.org; Tue, 14 Jul 2020 12:33:28 +0000 Received: by mail-lj1-x22c.google.com with SMTP id b25so22349622ljp.6 for ; Tue, 14 Jul 2020 05:33:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yMpHm4WqDuE5w35Dpo3ya7ihq54laIYWz0ZjM4I8nNs=; b=GB/ojmXx26pa2TxP/OS1QswL/rc93z0mard0G9lVD8nF9zFKIjQf7kQO/3mzwgTmbj LqzXPU7AxX9uc9SrwtzKgjdpSCFVscDxztDp7o3zZngfLgUhL36CQ6PraX2cb1gNkz9U hr7jVky34eHzbcMEyUPdMJLD1GxTQcQUCqz6c1jlEBSRvHe4D7zGnvkJ6fbUUkWElWyd Gcn5EW1BlTm/uwueeQBPNkS004mpPeLDeOnBWitlagps+gn53Cr1kEryZQrjS+rSJzyj ZLrKBIxRma4mrOpfO8C34/31IU+7VncsDchUxYrGLzCkXi3oOINRGP8HW+j/DuohjGLF BXNQ== 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=yMpHm4WqDuE5w35Dpo3ya7ihq54laIYWz0ZjM4I8nNs=; b=j5gjNoakbQZbDGyXWLeKSDRQ+YyhqUtLpFr0WjGgPtnGpxaC5lEO1y9xaUDCE5Vt69 SvGxFzue5hMT8SwgKLT1IOZIK9RM4ogGBw6IvVKhRO+sB78dK8IiZdEhO2a50TqdkOMQ WxSYTiQ9rr/lLmdWQZMCj18JdyJuNwa569u0nfRf/2R2IOqYLPJM6vNVt9P+V7Otp4kr BNNWWFOeDABYYQyi5U1AW1J5C3cYK8xmHR+TsIaGJNynbI3hYix9zJcL0mf0qC1Y9A1k 71Gt/VRCZSeeOYYBYTBAge6tk/njOdaqEbjodloydyIJHCQ75ruwG9tMjADILjqpKVKH nzog== X-Gm-Message-State: AOAM531CWoMDilmF8aVXRnizQY9y3bJpV8GpcVhjaGkRj+e9KVjr9ESK ymbUmhrVDpao2b9E2xy72s9dSeIzR0U= X-Google-Smtp-Source: ABdhPJwQocZva54G8/MO1wrVLrL2Ragh7FNDKwsvQJixwawNTbwXew+93M8p998zYaWb6lmn7xpicw== X-Received: by 2002:a2e:9c92:: with SMTP id x18mr2114370lji.70.1594730005069; Tue, 14 Jul 2020 05:33:25 -0700 (PDT) Received: from frog.lan ([2a01:799:10df:4000:e70:1b7d:12fb:1c30]) by smtp.gmail.com with ESMTPSA id b11sm5256776lfa.50.2020.07.14.05.33.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 05:33:24 -0700 (PDT) From: Michael Yartys To: openwrt-devel@lists.openwrt.org Subject: [RFC PATCH 2/2] hostapd: disable okc by default on WPA3-Personal networks Date: Tue, 14 Jul 2020 14:32:34 +0200 Message-Id: <20200714123234.569332-3-michael.yartys@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200714123234.569332-1-michael.yartys@gmail.com> References: <20200714123234.569332-1-michael.yartys@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200714_083327_271723_F0586451 X-CRM114-Status: GOOD ( 10.20 ) 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 [2a00:1450:4864:20:0:0:0:22c listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [michael.yartys[at]gmail.com] -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 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Yartys Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Don't enable Opportunistic Key Caching by default on WPA3-Personal networks. iOS devices only require PMKSA caching to be enabled to connect to a WPA3-Personal network, not Opportunistic Key Caching. Fixes: 3034f8c3b85e70b1dd9b4cd5cd33e9d2cd8be3b8 ("hostapd: enable PMKSA and OK caching for WPA3-Personal") Signed-off-by: Michael Yartys --- package/network/services/hostapd/files/hostapd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 644bad2a62..e8c7d5154e 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -617,7 +617,7 @@ hostapd_set_bss_options() { case "$auth_type" in sae|psk-sae|owe) set_default pmksa_cache 1 - set_default okc 1 + set_default okc 0 ;; *) set_default pmksa_cache 0