hostapd: backport build fix when OWE is activated

This backports a compile fix form the hostapd project.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
master
Hauke Mehrtens 6 years ago
parent 4b93b03577
commit 779773a0de
  1. 7
      package/network/services/hostapd/patches/0001-WPA-Ignore-unauthenticated-encrypted-EAPOL-Key-data.patch
  2. 29
      package/network/services/hostapd/patches/040-OWE-Fix-build-error-in-AP-code-without-CONFIG_IEEE80.patch
  3. 4
      package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch
  4. 4
      package/network/services/hostapd/patches/381-hostapd_cli_UNKNOWN-COMMAND.patch
  5. 9
      package/network/services/hostapd/patches/700-fix-openssl11.patch

@ -21,11 +21,9 @@ Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
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

@ -0,0 +1,29 @@
From 410e2dd1d6b645bf5ed3ed55a9a415acbd993532 Mon Sep 17 00:00:00 2001
From: Chaitanya T K <Chaitanya.Mgit@gmail.com>
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 <chaitanya.mgit@gmail.com>
---
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;

@ -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;
}

@ -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

@ -11,11 +11,9 @@ Signed-off-by: Rosen Penev <rosenp@gmail.com>
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

Loading…
Cancel
Save