]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/hostapd/hostapd-2.6-noscan.patch
unbound: Mark domains as insecure from DNS forwarding
[people/pmueller/ipfire-2.x.git] / src / patches / hostapd / hostapd-2.6-noscan.patch
1 diff -Naur hostapd-2.6.org/hostapd/config_file.c hostapd-2.6/hostapd/config_file.c
2 --- hostapd-2.6.org/hostapd/config_file.c 2016-10-02 20:51:11.000000000 +0200
3 +++ hostapd-2.6/hostapd/config_file.c 2018-10-26 09:16:34.393456086 +0200
4 @@ -2863,6 +2863,10 @@
5 }
6 #endif /* CONFIG_IEEE80211W */
7 #ifdef CONFIG_IEEE80211N
8 + } else if (os_strcmp(buf, "noscan") == 0) {
9 + conf->noscan = atoi(pos);
10 + } else if (os_strcmp(buf, "ht_coex") == 0) {
11 + conf->no_ht_coex = !atoi(pos);
12 } else if (os_strcmp(buf, "ieee80211n") == 0) {
13 conf->ieee80211n = atoi(pos);
14 } else if (os_strcmp(buf, "ht_capab") == 0) {
15 diff -Naur hostapd-2.6.org/src/ap/ap_config.h hostapd-2.6/src/ap/ap_config.h
16 --- hostapd-2.6.org/src/ap/ap_config.h 2016-10-02 20:51:11.000000000 +0200
17 +++ hostapd-2.6/src/ap/ap_config.h 2018-10-26 09:16:34.393456086 +0200
18 @@ -664,6 +664,8 @@
19
20 int ht_op_mode_fixed;
21 u16 ht_capab;
22 + int noscan;
23 + int no_ht_coex;
24 int ieee80211n;
25 int secondary_channel;
26 int no_pri_sec_switch;
27 diff -Naur hostapd-2.6.org/src/ap/hw_features.c hostapd-2.6/src/ap/hw_features.c
28 --- hostapd-2.6.org/src/ap/hw_features.c 2016-10-02 20:51:11.000000000 +0200
29 +++ hostapd-2.6/src/ap/hw_features.c 2018-10-26 09:16:34.393456086 +0200
30 @@ -474,7 +474,8 @@
31 int ret;
32
33 /* Check that HT40 is used and PRI / SEC switch is allowed */
34 - if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch)
35 + if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch ||
36 + iface->conf->noscan)
37 return 0;
38
39 hostapd_set_state(iface, HAPD_IFACE_HT_SCAN);
40 diff -Naur hostapd-2.6.org/src/ap/ieee802_11_ht.c hostapd-2.6/src/ap/ieee802_11_ht.c
41 --- hostapd-2.6.org/src/ap/ieee802_11_ht.c 2016-10-02 20:51:11.000000000 +0200
42 +++ hostapd-2.6/src/ap/ieee802_11_ht.c 2018-10-26 09:17:42.976793198 +0200
43 @@ -244,6 +244,9 @@
44 if (!(iface->conf->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET))
45 return;
46
47 + if (iface->conf->noscan || iface->conf->no_ht_coex)
48 + return;
49 +
50 if (len < IEEE80211_HDRLEN + 2 + sizeof(*bc_ie))
51 return;
52
53 @@ -368,6 +371,9 @@
54 if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G)
55 return;
56
57 + if (iface->conf->noscan || iface->conf->no_ht_coex)
58 + return;
59 +
60 wpa_printf(MSG_INFO, "HT: Forty MHz Intolerant is set by STA " MACSTR
61 " in Association Request", MAC2STR(sta->addr));
62