From patchwork Sat Nov 9 03:42:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Richard via openwrt-devel X-Patchwork-Id: 1192362 X-Patchwork-Delegate: blogic@openwrt.org 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=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=lists.openwrt.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="n5NKQV4s"; 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 47930Z1JvPz9sPF for ; Sat, 9 Nov 2019 14:44:14 +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-Type:Subject: List-Help:Reply-To:List-Archive:List-Unsubscribe:List-Subscribe:From: List-Post:List-Id:Message-ID:MIME-Version:Date:To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=4MfWgliWXk0V1LRLWxa61fclOqtoIbrcOw2z3F7qzL4=; b=n5N KQV4syvktI+nWTHTgEfX8Kp6Ft3mpAS8Csx9uYFmRbXk1HIBVac45x/5IGpcqXIWdYprELV3AigmG m60/8jMQVy7CdHnArOSD6kUIU2ds0MEiZ5eTivHfH2s/qTM5VJGvrU8qF982W1iNrAEwaBMY/NTYU I8SRK4GINL50USDilgxGE7oPW3MB+iBM7lbRwEdYhvcF17PfO5C7DGTOcgYRwyGvAU+m53HZnOaKI gIGcgg9ZPllRkckOKpFIHCYadO2q2R4lW1D5Kkg3ZWXKx0nx+U2vDnwIyjvauWP+3PSba0VQiYXT/ u7siiqtj/TvgL4DTvwDR5wg1xNSWhmQ==; 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 1iTHfK-00011k-Hi; Sat, 09 Nov 2019 03:43:58 +0000 To: openwrt-devel@lists.openwrt.org Date: Fri, 8 Nov 2019 19:42:56 -0800 MIME-Version: 1.0 Message-ID: List-Id: List-Post: X-Patchwork-Original-From: Kyle Copperfield via openwrt-devel From: Thomas Richard via openwrt-devel Precedence: list X-Mailman-Version: 2.1.29 X-BeenThere: openwrt-devel@lists.openwrt.org List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Kyle Copperfield List-Help: Subject: [OpenWrt-Devel] [PATCH 1/2] hostapd: add dtim_period, local_pwr_constraint, spectrum_mgmt_required Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. Allows dtim_period to be configurable, the default is from hostapd. Adds additional regulatory tunables for power constraint and spectrum managment. Signed-off-by: Kyle Copperfield --- package/network/services/hostapd/Makefile | 2 +- package/network/services/hostapd/files/hostapd.sh | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index 4f6420f503..86534054b8 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://w1.fi/hostap.git PKG_SOURCE_PROTO:=git diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 3c1504ca60..86b9932301 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -90,6 +90,8 @@ hostapd_common_add_device_config() { config_add_string country config_add_boolean country_ie doth + config_add_boolean spectrum_mgmt_required + config_add_int local_pwr_constraint config_add_string require_mode config_add_boolean legacy_rates @@ -106,11 +108,13 @@ hostapd_prepare_device_config() { local base="${config%%.conf}" local base_cfg= - json_get_vars country country_ie beacon_int:100 doth require_mode legacy_rates acs_chan_bias + json_get_vars country country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \ + acs_chan_bias local_pwr_constraint spectrum_mgmt_required hostapd_set_log_options base_cfg set_default country_ie 1 + set_default spectrum_mgmt_required 0 set_default doth 1 set_default legacy_rates 1 @@ -119,7 +123,11 @@ hostapd_prepare_device_config() { [ -n "$country" ] && { append base_cfg "country_code=$country" "$N" - [ "$country_ie" -gt 0 ] && append base_cfg "ieee80211d=1" "$N" + [ "$country_ie" -gt 0 ] && { + append base_cfg "ieee80211d=1" "$N" + [ -n "$local_pwr_constraint" ] && append base_cfg "local_pwr_constraint=$local_pwr_constraint" "$N" + [ "$spectrum_mgmt_required" -gt 0 ] && append base_cfg "spectrum_mgmt_required=$spectrum_mgmt_required" "$N" + } [ "$hwmode" = "a" -a "$doth" -gt 0 ] && append base_cfg "ieee80211h=1" "$N" } @@ -154,6 +162,7 @@ hostapd_prepare_device_config() { [ -n "$rlist" ] && append base_cfg "supported_rates=$rlist" "$N" [ -n "$brlist" ] && append base_cfg "basic_rates=$brlist" "$N" append base_cfg "beacon_int=$beacon_int" "$N" + append base_cfg "dtim_period=$dtim_period" "$N" json_get_values opts hostapd_options for val in $opts; do From patchwork Sat Nov 9 03:42:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Richard via openwrt-devel X-Patchwork-Id: 1192361 X-Patchwork-Delegate: blogic@openwrt.org 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=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=lists.openwrt.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hOAsYPbU"; 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 47930B4bw2z9sPT for ; Sat, 9 Nov 2019 14:43:54 +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-Type:Subject: List-Help:Reply-To:List-Archive:List-Unsubscribe:List-Subscribe:From: List-Post:List-Id:Message-ID:MIME-Version:References:In-Reply-To:Date:To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=En7m3tpUzKQgmEzrp1nxzG7zE/4YmMZhSAaPF7s8oyE=; b=hOAsYPbUmg1iJ2wGvkzd3DXIL ifIhTVK0uSE3k+nNiuY6NpeYEC+5xemP9mn4lrf6IWxpOrStNcHaiqcwVtDr8/YzQs2ZKHWbrrdv9 r31n4I6xdyTTDPEddx4CpUTmv4EXzXQYXme0eyO+6tZ2AEpFSh8kTlGsW0ffJLCwLMaTe3MUSsVXO xHxot0funS6sZrXPTEISAvuaIb3blfGaNwdJPXMH7nga4EQH1h7b3YxO5q49SBnjC/sW7WiylgIi3 kMYEaLRtlYOXBK9ENyOj/eWPeclVEqnOht1J6lKdsSvSiayhpUUyuh5fFSDeuLtwrGFlp3wdsaefA gXOHVf4/A==; 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 1iTHfA-0000rL-7O; Sat, 09 Nov 2019 03:43:48 +0000 To: openwrt-devel@lists.openwrt.org Date: Fri, 8 Nov 2019 19:42:57 -0800 In-Reply-To: <20191109034257.44951-1-kmcopper@danwin1210.me> References: <20191109034257.44951-1-kmcopper@danwin1210.me> MIME-Version: 1.0 Message-ID: List-Id: List-Post: X-Patchwork-Original-From: Kyle Copperfield via openwrt-devel From: Thomas Richard via openwrt-devel Precedence: list X-Mailman-Version: 2.1.29 X-BeenThere: openwrt-devel@lists.openwrt.org List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Kyle Copperfield List-Help: Subject: [OpenWrt-Devel] [PATCH 2/2] hostapd: add wpa_strict_rekey support Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. Rekey GTK on STA disassociate Signed-off-by: Kyle Copperfield --- package/network/services/hostapd/files/hostapd.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 86b9932301..9378d5afd9 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -185,6 +185,7 @@ hostapd_common_add_bss_config() { config_add_int \ wep_rekey eap_reauth_period \ wpa_group_rekey wpa_pair_rekey wpa_master_rekey + config_add_boolean wpa_strict_rekey config_add_boolean wpa_disable_eapol_key_retries config_add_boolean tdls_prohibit @@ -267,7 +268,7 @@ hostapd_set_bss_options() { local wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey wpa_key_mgmt json_get_vars \ - wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey \ + 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 \ wps_pushbutton wps_label ext_registrar wps_pbc_in_m1 wps_ap_setup_locked \ @@ -322,6 +323,7 @@ hostapd_set_bss_options() { [ -n "$wpa_group_rekey" ] && append bss_conf "wpa_group_rekey=$wpa_group_rekey" "$N" [ -n "$wpa_pair_rekey" ] && append bss_conf "wpa_ptk_rekey=$wpa_pair_rekey" "$N" [ -n "$wpa_master_rekey" ] && append bss_conf "wpa_gmk_rekey=$wpa_master_rekey" "$N" + [ -n "$wpa_strict_rekey" ] && append bss_conf "wpa_strict_rekey=$wpa_strict_rekey" "$N" } [ -n "$nasid" ] && append bss_conf "nas_identifier=$nasid" "$N"