Revert "Hostapd patches update and cleanup"

This reverts commit 9a752921c5.
This commit is contained in:
Igor Pecovnik 2018-01-05 21:15:14 +01:00
parent a725691d2e
commit 1c7cdec6f6
7 changed files with 8190 additions and 294 deletions

View File

@ -20,13 +20,13 @@ index 9c744de..8e7bcc7 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -208,7 +208,8 @@ static int hostapd_config_read_maclist(const char *fname,
fclose(f);
- qsort(*acl, *num, sizeof(**acl), hostapd_acl_comp);
+ if (*acl)
+ qsort(*acl, *num, sizeof(**acl), hostapd_acl_comp);
return 0;
}
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
@ -36,7 +36,7 @@ index fb8ebdf..bfde0af 100644
@@ -2177,8 +2177,10 @@ wpa_supplicant_get_scan_results(struct wpa_supplicant *wpa_s,
}
#endif /* CONFIG_WPS */
- qsort(scan_res->res, scan_res->num, sizeof(struct wpa_scan_res *),
- compar);
+ if (scan_res->res) {
@ -44,8 +44,8 @@ index fb8ebdf..bfde0af 100644
+ sizeof(struct wpa_scan_res *), compar);
+ }
dump_scan_res(scan_res);
wpa_bss_update_start(wpa_s);
--
--
2.9.3

View File

@ -30,13 +30,15 @@ diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c
index 16887acdf..75012df30 100644
--- a/src/ap/hw_features.c
+++ b/src/ap/hw_features.c
@@ -474,6 +474,6 @@ static int ieee80211n_check_40mhz(struct hostapd_iface *iface)
@@ -474,7 +474,8 @@ static int ieee80211n_check_40mhz(struct hostapd_iface *iface)
int ret;
- if (!iface->conf->secondary_channel)
+ if (!iface->conf->secondary_channel || iface->conf->noscan)
return 0; /* HT40 not used */
/* Check that HT40 is used and PRI / SEC switch is allowed */
- if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch)
+ if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch ||
+ iface->conf->noscan)
return 0;
hostapd_set_state(iface, HAPD_IFACE_HT_SCAN);
diff --git a/src/ap/ieee802_11_ht.c b/src/ap/ieee802_11_ht.c
index 5eb1060a2..552bcc9bc 100644

View File

@ -1,38 +0,0 @@
From patchwork Wed Jan 3 18:53:53 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: hostapd: Allow HT40 on ch 165, 169.
X-Patchwork-Submitter: Ben Greear <greearb@candelatech.com>
X-Patchwork-Id: 855186
Message-Id: <1515005633-26836-1-git-send-email-greearb@candelatech.com>
To: hostap@lists.infradead.org
Cc: Ben Greear <greearb@candelatech.com>
Date: Wed, 3 Jan 2018 10:53:53 -0800
From: greearb@candelatech.com
List-Id: <hostap.lists.infradead.org>
From: Ben Greear <greearb@candelatech.com>
India supports CH 169 and 173 now. Enable HT40 across
CH 165 and 169. I think that CH 173 must remain HT20
only.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
src/common/hw_features_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/common/hw_features_common.c b/src/common/hw_features_common.c
index 4486124..263958d 100644
--- a/src/common/hw_features_common.c
+++ b/src/common/hw_features_common.c
@@ -89,7 +89,7 @@ int allowed_ht40_channel_pair(struct hostapd_hw_modes *mode, int pri_chan,
{
int ok, j, first;
int allowed[] = { 36, 44, 52, 60, 100, 108, 116, 124, 132, 140,
- 149, 157, 184, 192 };
+ 149, 157, 165, 184, 192 };
size_t k;
if (pri_chan == sec_chan || !sec_chan)

View File

@ -1,21 +1,12 @@
From: Jeremy Nickurak <jeremy@nickurak.ca>
Subject: Disable the session ticket TLS extension.
Bug-ubuntu: https://bugs.launchpad.net/ubuntu/+source/wpasupplicant/+bug/969343
Bug: http://w1.fi/bugz/show_bug.cgi?id=447
---
src/crypto/tls_openssl.c | 1 +
1 file changed, 1 insertion(+)
Index: b/src/crypto/tls_openssl.c
===================================================================
diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c
index 23ac64b48..cc8d159e0 100644
--- a/src/crypto/tls_openssl.c
+++ b/src/crypto/tls_openssl.c
@@ -1060,6 +1060,7 @@ struct tls_connection * tls_connection_i
@@ -1354,6 +1354,7 @@ struct tls_connection * tls_connection_init(void *ssl_ctx)
#ifdef SSL_OP_NO_COMPRESSION
options |= SSL_OP_NO_COMPRESSION;
#endif /* SSL_OP_NO_COMPRESSION */
+ options |= SSL_OP_NO_TICKET;
SSL_set_options(conn->ssl, options);
conn->ssl_in = BIO_new(BIO_s_mem());

View File

@ -1,44 +0,0 @@
From patchwork Mon Dec 4 17:18:26 2017
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: wpa-cli: Make ping/pong work more reliably.
X-Patchwork-Submitter: Ben Greear <greearb@candelatech.com>
X-Patchwork-Id: 844334
Message-Id: <1512407906-6986-1-git-send-email-greearb@candelatech.com>
To: hostap@lists.infradead.org
Cc: Ben Greear <greearb@candelatech.com>
Date: Mon, 4 Dec 2017 09:18:26 -0800
From: greearb@candelatech.com
List-Id: <hostap.lists.infradead.org>
From: Ben Greear <greearb@candelatech.com>
In 2013 or so, IFNAME=foo was prepended to at least the
Unix socket communication from wpa_supplicant to wpa_cli.
This broke the (fragile) logic that made ping/pong work more
often when the supplicant is busy sending logging info to
the wpa_cli.
Adding check for IFNAME=foo makes this work better.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
src/common/wpa_ctrl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/common/wpa_ctrl.c b/src/common/wpa_ctrl.c
index 623c2a7..1f1c9c4 100644
--- a/src/common/wpa_ctrl.c
+++ b/src/common/wpa_ctrl.c
@@ -540,7 +540,8 @@ retry_send:
res = recv(ctrl->s, reply, *reply_len, 0);
if (res < 0)
return res;
- if (res > 0 && reply[0] == '<') {
+ if ((res > 0 && reply[0] == '<') ||
+ (res > 6 && strncmp(reply, "IFNAME=", 7) == 0)) {
/* This is an unsolicited message from
* wpa_supplicant, not the reply to the
* request. Use msg_cb to report this to the