From patchwork Fri Oct 5 21:49:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 979807 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 (mailfrom) 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=hauke-m.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CrLwjE68"; 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 42RkHP4Xpkz9s5c for ; Sat, 6 Oct 2018 08:01:37 +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:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wa84R3tOLIJZCm2v3Uy15jzvHno2KNByXUYmViyuAcw=; b=CrLwjE68a5Vo63 rmuAx+WI6qyiDL0mol6yQ2YhT+4POIzBvzpQAcaXC4Q/S2gefMWRZmYiZE80GT4+7ISW+8R6DJBPi ngoS+TQiWuWzSdXKdVIf23Uph6hz+dW40biXgAyOKFrZ9PYkEP+IxiyUaALKUCogaByy5jJ16kT13 y/428biKO7uKCZgU+xsWJbMyqa1eGPgxwqTV6m1xrUs5MkA5jLketLncR/buxi4MTcB+E0iicfoIj f6ESxhFjpU93ogQeUTACf7RVhxS/zGGUnVPU5QVp0Np75MKfXfmTo6lmOJgbzNGqFKZuCWVR+Tmsc Kr8A66HBuBz6T3FkrIww==; 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 1g8YA4-0007Gg-LA; Fri, 05 Oct 2018 22:01:28 +0000 Received: from mx2a.mailbox.org ([2001:67c:2050:104:0:2:25:2] helo=mx2.mailbox.org) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g8Y8t-0005b2-E5 for openwrt-devel@lists.openwrt.org; Fri, 05 Oct 2018 22:00:29 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 9ED24413CF; Fri, 5 Oct 2018 23:49:43 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id 9fk_17sc35yN; Fri, 5 Oct 2018 23:49:41 +0200 (CEST) From: Hauke Mehrtens To: openwrt-devel@lists.openwrt.org Date: Fri, 5 Oct 2018 23:49:26 +0200 Message-Id: <20181005214930.23763-3-hauke@hauke-m.de> In-Reply-To: <20181005214930.23763-1-hauke@hauke-m.de> References: <20181005214930.23763-1-hauke@hauke-m.de> X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181005_150015_831267_ED167E33 X-CRM114-Status: GOOD ( 18.41 ) 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 Subject: [OpenWrt-Devel] [RFC 2/6] hostapd: backport build fix when OWE is activated X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hauke Mehrtens MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Signed-off-by: Hauke Mehrtens --- ...-unauthenticated-encrypted-EAPOL-Key-data.patch | 7 +----- ...ld-error-in-AP-code-without-CONFIG_IEEE80.patch | 29 ++++++++++++++++++++++ .../patches/380-disable_ctrl_iface_mib.patch | 4 +-- .../patches/381-hostapd_cli_UNKNOWN-COMMAND.patch | 4 +-- .../hostapd/patches/700-fix-openssl11.patch | 9 ++----- 5 files changed, 35 insertions(+), 18 deletions(-) create mode 100644 package/network/services/hostapd/patches/040-OWE-Fix-build-error-in-AP-code-without-CONFIG_IEEE80.patch diff --git a/package/network/services/hostapd/patches/0001-WPA-Ignore-unauthenticated-encrypted-EAPOL-Key-data.patch b/package/network/services/hostapd/patches/0001-WPA-Ignore-unauthenticated-encrypted-EAPOL-Key-data.patch index 1b84f7e86a..633ab58623 100644 --- a/package/network/services/hostapd/patches/0001-WPA-Ignore-unauthenticated-encrypted-EAPOL-Key-data.patch +++ b/package/network/services/hostapd/patches/0001-WPA-Ignore-unauthenticated-encrypted-EAPOL-Key-data.patch @@ -21,11 +21,9 @@ Signed-off-by: Mathy Vanhoef src/rsn_supp/wpa.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c -index 56f3af7..db94a49 100644 --- a/src/rsn_supp/wpa.c +++ b/src/rsn_supp/wpa.c -@@ -2215,6 +2215,17 @@ int wpa_sm_rx_eapol(struct wpa_sm *sm, const u8 *src_addr, +@@ -2208,6 +2208,17 @@ int wpa_sm_rx_eapol(struct wpa_sm *sm, c if ((sm->proto == WPA_PROTO_RSN || sm->proto == WPA_PROTO_OSEN) && (key_info & WPA_KEY_INFO_ENCR_KEY_DATA) && mic_len) { @@ -43,6 +41,3 @@ index 56f3af7..db94a49 100644 if (wpa_supplicant_decrypt_key_data(sm, key, mic_len, ver, key_data, &key_data_len)) --- -2.7.4 - diff --git a/package/network/services/hostapd/patches/040-OWE-Fix-build-error-in-AP-code-without-CONFIG_IEEE80.patch b/package/network/services/hostapd/patches/040-OWE-Fix-build-error-in-AP-code-without-CONFIG_IEEE80.patch new file mode 100644 index 0000000000..ae9733110b --- /dev/null +++ b/package/network/services/hostapd/patches/040-OWE-Fix-build-error-in-AP-code-without-CONFIG_IEEE80.patch @@ -0,0 +1,29 @@ +From 410e2dd1d6b645bf5ed3ed55a9a415acbd993532 Mon Sep 17 00:00:00 2001 +From: Chaitanya T K +Date: Wed, 29 Aug 2018 02:14:33 +0530 +Subject: [PATCH] OWE: Fix build error in AP code without CONFIG_IEEE80211W=y + +When CONFIG_OWE is enabled but none of 11R/11W/FILS are enabled hostapd +(and wpa_supplicant with AP mode support) build failed. Fix this by +adding OWE to the list of conditions for including the local variables. + +Signed-off-by: Chaitanya T K +--- + src/ap/drv_callbacks.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/src/ap/drv_callbacks.c ++++ b/src/ap/drv_callbacks.c +@@ -109,10 +109,10 @@ int hostapd_notif_assoc(struct hostapd_d + struct ieee802_11_elems elems; + const u8 *ie; + size_t ielen; +-#if defined(CONFIG_IEEE80211R_AP) || defined(CONFIG_IEEE80211W) || defined(CONFIG_FILS) ++#if defined(CONFIG_IEEE80211R_AP) || defined(CONFIG_IEEE80211W) || defined(CONFIG_FILS) || defined(CONFIG_OWE) + u8 buf[sizeof(struct ieee80211_mgmt) + 1024]; + u8 *p = buf; +-#endif /* CONFIG_IEEE80211R_AP || CONFIG_IEEE80211W || CONFIG_FILS */ ++#endif /* CONFIG_IEEE80211R_AP || CONFIG_IEEE80211W || CONFIG_FILS || CONFIG_OWE */ + u16 reason = WLAN_REASON_UNSPECIFIED; + u16 status = WLAN_STATUS_SUCCESS; + const u8 *p2p_dev_addr = NULL; diff --git a/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch b/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch index 12689eab57..cd050fc0c9 100644 --- a/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch +++ b/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch @@ -163,7 +163,7 @@ { --- a/src/rsn_supp/wpa.c +++ b/src/rsn_supp/wpa.c -@@ -2295,6 +2295,8 @@ static u32 wpa_key_mgmt_suite(struct wpa +@@ -2306,6 +2306,8 @@ static u32 wpa_key_mgmt_suite(struct wpa } @@ -172,7 +172,7 @@ #define RSN_SUITE "%02x-%02x-%02x-%d" #define RSN_SUITE_ARG(s) \ ((s) >> 24) & 0xff, ((s) >> 16) & 0xff, ((s) >> 8) & 0xff, (s) & 0xff -@@ -2378,6 +2380,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch +@@ -2389,6 +2391,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch return (int) len; } diff --git a/package/network/services/hostapd/patches/381-hostapd_cli_UNKNOWN-COMMAND.patch b/package/network/services/hostapd/patches/381-hostapd_cli_UNKNOWN-COMMAND.patch index 81e6588e72..7bac937373 100644 --- a/package/network/services/hostapd/patches/381-hostapd_cli_UNKNOWN-COMMAND.patch +++ b/package/network/services/hostapd/patches/381-hostapd_cli_UNKNOWN-COMMAND.patch @@ -1,6 +1,6 @@ --- a/hostapd/hostapd_cli.c +++ b/hostapd/hostapd_cli.c -@@ -743,7 +743,7 @@ static int wpa_ctrl_command_sta(struct wpa_ctrl *ctrl, const char *cmd, +@@ -743,7 +743,7 @@ static int wpa_ctrl_command_sta(struct w } buf[len] = '\0'; @@ -9,5 +9,3 @@ return -1; if (print) printf("%s", buf); --- -2.11.0 diff --git a/package/network/services/hostapd/patches/700-fix-openssl11.patch b/package/network/services/hostapd/patches/700-fix-openssl11.patch index 918cab0899..86343c150b 100644 --- a/package/network/services/hostapd/patches/700-fix-openssl11.patch +++ b/package/network/services/hostapd/patches/700-fix-openssl11.patch @@ -11,11 +11,9 @@ Signed-off-by: Rosen Penev src/crypto/tls_openssl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c -index b4bfc9b73..79ac909d0 100644 --- a/src/crypto/tls_openssl.c +++ b/src/crypto/tls_openssl.c -@@ -1024,8 +1024,10 @@ void * tls_init(const struct tls_config *conf) +@@ -1024,8 +1024,10 @@ void * tls_init(const struct tls_config #ifndef OPENSSL_NO_ENGINE wpa_printf(MSG_DEBUG, "ENGINE: Loading dynamic engine"); @@ -26,7 +24,7 @@ index b4bfc9b73..79ac909d0 100644 if (conf && (conf->opensc_engine_path || conf->pkcs11_engine_path || -@@ -3874,7 +3876,7 @@ struct wpabuf * tls_connection_decrypt(void *tls_ctx, +@@ -3874,7 +3876,7 @@ struct wpabuf * tls_connection_decrypt(v int tls_connection_resumed(void *ssl_ctx, struct tls_connection *conn) { @@ -35,6 +33,3 @@ index b4bfc9b73..79ac909d0 100644 } --- -2.17.1 -