From: Hauke Mehrtens Date: Wed, 3 Oct 2018 18:56:41 +0000 (+0200) Subject: hostapd: backport build fix when OWE is activated X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=779773a0dee759d87c483de266e41164cd851af0;p=openwrt%2Fstaging%2Fnbd.git hostapd: backport build fix when OWE is activated This backports a compile fix form the hostapd project. Signed-off-by: Hauke Mehrtens --- 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 -