OpenWrt – Diff between revs 2 and 3
?pathlinks?
Rev 2 | Rev 3 | |||
---|---|---|---|---|
Line 10... | Line 10... | |||
10 | ifeq ($(CONFIG_CTRL_IFACE), udp) |
10 | ifeq ($(CONFIG_CTRL_IFACE), udp) |
|
11 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
11 | CFLAGS += -DCONFIG_CTRL_IFACE_UDP |
|
12 | else |
12 | else |
|
13 | --- a/hostapd/ctrl_iface.c |
13 | --- a/hostapd/ctrl_iface.c |
|
14 | +++ b/hostapd/ctrl_iface.c |
14 | +++ b/hostapd/ctrl_iface.c |
|
15 | @@ -2912,6 +2912,7 @@ static int hostapd_ctrl_iface_receive_pr |
15 | @@ -2852,6 +2852,7 @@ static int hostapd_ctrl_iface_receive_pr |
|
16 | reply_size); |
16 | reply_size); |
|
17 | } else if (os_strcmp(buf, "STATUS-DRIVER") == 0) { |
17 | } else if (os_strcmp(buf, "STATUS-DRIVER") == 0) { |
|
18 | reply_len = hostapd_drv_status(hapd, reply, reply_size); |
18 | reply_len = hostapd_drv_status(hapd, reply, reply_size); |
|
19 | +#ifdef CONFIG_CTRL_IFACE_MIB |
19 | +#ifdef CONFIG_CTRL_IFACE_MIB |
|
20 | } else if (os_strcmp(buf, "MIB") == 0) { |
20 | } else if (os_strcmp(buf, "MIB") == 0) { |
|
21 | reply_len = ieee802_11_get_mib(hapd, reply, reply_size); |
21 | reply_len = ieee802_11_get_mib(hapd, reply, reply_size); |
|
22 | if (reply_len >= 0) { |
22 | if (reply_len >= 0) { |
|
23 | @@ -2953,6 +2954,7 @@ static int hostapd_ctrl_iface_receive_pr |
23 | @@ -2893,6 +2894,7 @@ static int hostapd_ctrl_iface_receive_pr |
|
24 | } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) { |
24 | } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) { |
|
25 | reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply, |
25 | reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply, |
|
26 | reply_size); |
26 | reply_size); |
|
27 | +#endif |
27 | +#endif |
|
28 | } else if (os_strcmp(buf, "ATTACH") == 0) { |
28 | } else if (os_strcmp(buf, "ATTACH") == 0) { |
|
Line 40... | Line 40... | |||
40 | OBJS += ../src/ap/ctrl_iface_ap.o |
40 | OBJS += ../src/ap/ctrl_iface_ap.o |
|
41 | endif |
41 | endif |
|
Line 42... | Line 42... | |||
42 | |
42 | |
|
43 | --- a/wpa_supplicant/ctrl_iface.c |
43 | --- a/wpa_supplicant/ctrl_iface.c |
|
44 | +++ b/wpa_supplicant/ctrl_iface.c |
44 | +++ b/wpa_supplicant/ctrl_iface.c |
|
45 | @@ -2117,7 +2117,7 @@ static int wpa_supplicant_ctrl_iface_sta |
45 | @@ -2108,7 +2108,7 @@ static int wpa_supplicant_ctrl_iface_sta |
|
46 | pos += ret; |
46 | pos += ret; |
|
Line 47... | Line 47... | |||
47 | } |
47 | } |
|
48 | |
48 | |
|
49 | -#ifdef CONFIG_AP |
49 | -#ifdef CONFIG_AP |
|
50 | +#if defined(CONFIG_AP) && defined(CONFIG_CTRL_IFACE_MIB) |
50 | +#if defined(CONFIG_AP) && defined(CONFIG_CTRL_IFACE_MIB) |
|
51 | if (wpa_s->ap_iface) { |
51 | if (wpa_s->ap_iface) { |
|
52 | pos += ap_ctrl_iface_wpa_get_status(wpa_s, pos, |
52 | pos += ap_ctrl_iface_wpa_get_status(wpa_s, pos, |
|
53 | end - pos, |
53 | end - pos, |
|
54 | @@ -9852,6 +9852,7 @@ char * wpa_supplicant_ctrl_iface_process |
54 | @@ -9809,6 +9809,7 @@ char * wpa_supplicant_ctrl_iface_process |
|
55 | reply_len = -1; |
55 | reply_len = -1; |
|
56 | } else if (os_strncmp(buf, "NOTE ", 5) == 0) { |
56 | } else if (os_strncmp(buf, "NOTE ", 5) == 0) { |
|
57 | wpa_printf(MSG_INFO, "NOTE: %s", buf + 5); |
57 | wpa_printf(MSG_INFO, "NOTE: %s", buf + 5); |
|
58 | +#ifdef CONFIG_CTRL_IFACE_MIB |
58 | +#ifdef CONFIG_CTRL_IFACE_MIB |
|
59 | } else if (os_strcmp(buf, "MIB") == 0) { |
59 | } else if (os_strcmp(buf, "MIB") == 0) { |
|
60 | reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size); |
60 | reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size); |
|
61 | if (reply_len >= 0) { |
61 | if (reply_len >= 0) { |
|
62 | @@ -9859,6 +9860,7 @@ char * wpa_supplicant_ctrl_iface_process |
62 | @@ -9816,6 +9817,7 @@ char * wpa_supplicant_ctrl_iface_process |
|
63 | reply + reply_len, |
63 | reply + reply_len, |
|
64 | reply_size - reply_len); |
64 | reply_size - reply_len); |
|
65 | } |
65 | } |
|
66 | +#endif |
66 | +#endif |
|
67 | } else if (os_strncmp(buf, "STATUS", 6) == 0) { |
67 | } else if (os_strncmp(buf, "STATUS", 6) == 0) { |
|
68 | reply_len = wpa_supplicant_ctrl_iface_status( |
68 | reply_len = wpa_supplicant_ctrl_iface_status( |
|
69 | wpa_s, buf + 6, reply, reply_size); |
69 | wpa_s, buf + 6, reply, reply_size); |
|
70 | @@ -10340,6 +10342,7 @@ char * wpa_supplicant_ctrl_iface_process |
70 | @@ -10297,6 +10299,7 @@ char * wpa_supplicant_ctrl_iface_process |
|
71 | reply_len = wpa_supplicant_ctrl_iface_bss( |
71 | reply_len = wpa_supplicant_ctrl_iface_bss( |
|
72 | wpa_s, buf + 4, reply, reply_size); |
72 | wpa_s, buf + 4, reply, reply_size); |
|
73 | #ifdef CONFIG_AP |
73 | #ifdef CONFIG_AP |
|
74 | +#ifdef CONFIG_CTRL_IFACE_MIB |
74 | +#ifdef CONFIG_CTRL_IFACE_MIB |
|
75 | } else if (os_strcmp(buf, "STA-FIRST") == 0) { |
75 | } else if (os_strcmp(buf, "STA-FIRST") == 0) { |
|
76 | reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size); |
76 | reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size); |
|
77 | } else if (os_strncmp(buf, "STA ", 4) == 0) { |
77 | } else if (os_strncmp(buf, "STA ", 4) == 0) { |
|
78 | @@ -10348,12 +10351,15 @@ char * wpa_supplicant_ctrl_iface_process |
78 | @@ -10305,12 +10308,15 @@ char * wpa_supplicant_ctrl_iface_process |
|
79 | } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) { |
79 | } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) { |
|
80 | reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply, |
80 | reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply, |
|
81 | reply_size); |
81 | reply_size); |
|
Line 99... | Line 99... | |||
99 | |
99 | |
|
Line 100... | Line 100... | |||
100 | +#ifdef CONFIG_CTRL_IFACE_MIB |
100 | +#ifdef CONFIG_CTRL_IFACE_MIB |
|
101 | |
101 | |
|
102 | static size_t hostapd_write_ht_mcs_bitmask(char *buf, size_t buflen, |
102 | static size_t hostapd_write_ht_mcs_bitmask(char *buf, size_t buflen, |
|
103 | size_t curr_len, const u8 *mcs_set) |
103 | size_t curr_len, const u8 *mcs_set) |
|
104 | @@ -415,6 +416,7 @@ int hostapd_ctrl_iface_sta_next(struct h |
104 | @@ -408,6 +409,7 @@ int hostapd_ctrl_iface_sta_next(struct h |
|
Line 105... | Line 105... | |||
105 | return hostapd_ctrl_iface_sta_mib(hapd, sta->next, buf, buflen); |
105 | return hostapd_ctrl_iface_sta_mib(hapd, sta->next, buf, buflen); |
|
Line 106... | Line 106... | |||
106 | } |
106 | } |
|
107 | |
107 | |
|
108 | +#endif |
108 | +#endif |
|
109 | |
109 | |
|
110 | #ifdef CONFIG_P2P_MANAGER |
110 | #ifdef CONFIG_P2P_MANAGER |
|
111 | static int p2p_manager_disconnect(struct hostapd_data *hapd, u16 stype, |
111 | static int p2p_manager_disconnect(struct hostapd_data *hapd, u16 stype, |
|
112 | @@ -753,12 +755,12 @@ int hostapd_ctrl_iface_status(struct hos |
112 | @@ -746,12 +748,12 @@ int hostapd_ctrl_iface_status(struct hos |
|
113 | return len; |
113 | return len; |
|
Line 124... | Line 124... | |||
124 | if (iface->current_rates && iface->num_rates) { |
124 | if (iface->current_rates && iface->num_rates) { |
|
125 | ret = os_snprintf(buf + len, buflen - len, "supported_rates="); |
125 | ret = os_snprintf(buf + len, buflen - len, "supported_rates="); |
|
126 | if (os_snprintf_error(buflen - len, ret)) |
126 | if (os_snprintf_error(buflen - len, ret)) |
|
127 | --- a/src/ap/ieee802_1x.c |
127 | --- a/src/ap/ieee802_1x.c |
|
128 | +++ b/src/ap/ieee802_1x.c |
128 | +++ b/src/ap/ieee802_1x.c |
|
129 | @@ -2581,6 +2581,7 @@ static const char * bool_txt(Boolean val |
129 | @@ -2504,6 +2504,7 @@ static const char * bool_txt(Boolean val |
|
130 | return val ? "TRUE" : "FALSE"; |
130 | return val ? "TRUE" : "FALSE"; |
|
131 | } |
131 | } |
|
Line 132... | Line 132... | |||
132 | |
132 | |
|
Line 133... | Line 133... | |||
133 | +#ifdef CONFIG_CTRL_IFACE_MIB |
133 | +#ifdef CONFIG_CTRL_IFACE_MIB |
|
134 | |
134 | |
|
135 | int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen) |
135 | int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen) |
|
136 | { |
136 | { |
|
137 | @@ -2756,6 +2757,7 @@ int ieee802_1x_get_mib_sta(struct hostap |
137 | @@ -2679,6 +2680,7 @@ int ieee802_1x_get_mib_sta(struct hostap |
|
Line 138... | Line 138... | |||
138 | return len; |
138 | return len; |
|
Line 139... | Line 139... | |||
139 | } |
139 | } |
|
140 | |
140 | |
|
141 | +#endif |
141 | +#endif |
|
142 | |
142 | |
|
143 | #ifdef CONFIG_HS20 |
143 | #ifdef CONFIG_HS20 |
|
144 | static void ieee802_1x_wnm_notif_send(void *eloop_ctx, void *timeout_ctx) |
144 | static void ieee802_1x_wnm_notif_send(void *eloop_ctx, void *timeout_ctx) |
|
145 | --- a/src/ap/wpa_auth.c |
145 | --- a/src/ap/wpa_auth.c |
|
Line 146... | Line 146... | |||
146 | +++ b/src/ap/wpa_auth.c |
146 | +++ b/src/ap/wpa_auth.c |
|
Line 147... | Line 147... | |||
147 | @@ -3798,6 +3798,7 @@ static const char * wpa_bool_txt(int val |
147 | @@ -3772,6 +3772,7 @@ static const char * wpa_bool_txt(int val |
|
148 | return val ? "TRUE" : "FALSE"; |
148 | return val ? "TRUE" : "FALSE"; |
|
149 | } |
149 | } |
|
Line 150... | Line 150... | |||
150 | |
150 | |
|
151 | +#ifdef CONFIG_CTRL_IFACE_MIB |
151 | +#ifdef CONFIG_CTRL_IFACE_MIB |
|
152 | |
152 | |
|
153 | #define RSN_SUITE "%02x-%02x-%02x-%d" |
153 | #define RSN_SUITE "%02x-%02x-%02x-%d" |
|
Line 154... | Line 154... | |||
154 | #define RSN_SUITE_ARG(s) \ |
154 | #define RSN_SUITE_ARG(s) \ |
|
155 | @@ -3942,7 +3943,7 @@ int wpa_get_mib_sta(struct wpa_state_mac |
155 | @@ -3916,7 +3917,7 @@ int wpa_get_mib_sta(struct wpa_state_mac |
|
156 | |
156 | |
|
157 | return len; |
157 | return len; |
|
158 | } |
158 | } |
|
159 | - |
159 | - |
|
Line 160... | Line 160... | |||
160 | +#endif |
160 | +#endif |
|
161 | |
161 | |
|
162 | void wpa_auth_countermeasures_start(struct wpa_authenticator *wpa_auth) |
162 | void wpa_auth_countermeasures_start(struct wpa_authenticator *wpa_auth) |
|
163 | { |
163 | { |
|
164 | --- a/src/rsn_supp/wpa.c |
164 | --- a/src/rsn_supp/wpa.c |
|
165 | +++ b/src/rsn_supp/wpa.c |
165 | +++ b/src/rsn_supp/wpa.c |
|
Line 166... | Line 166... | |||
166 | @@ -2319,6 +2319,8 @@ static u32 wpa_key_mgmt_suite(struct wpa |
166 | @@ -2295,6 +2295,8 @@ static u32 wpa_key_mgmt_suite(struct wpa |
|
167 | } |
167 | } |
|
168 | |
168 | |
|
169 | |
169 | |
|
Line 170... | Line 170... | |||
170 | +#ifdef CONFIG_CTRL_IFACE_MIB |
170 | +#ifdef CONFIG_CTRL_IFACE_MIB |
|
171 | + |
171 | + |
|
172 | #define RSN_SUITE "%02x-%02x-%02x-%d" |
172 | #define RSN_SUITE "%02x-%02x-%02x-%d" |
|
173 | #define RSN_SUITE_ARG(s) \ |
173 | #define RSN_SUITE_ARG(s) \ |
|
Line 174... | Line 174... | |||
174 | ((s) >> 24) & 0xff, ((s) >> 16) & 0xff, ((s) >> 8) & 0xff, (s) & 0xff |
174 | ((s) >> 24) & 0xff, ((s) >> 16) & 0xff, ((s) >> 8) & 0xff, (s) & 0xff |
|
175 | @@ -2402,6 +2404,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch |
175 | @@ -2378,6 +2380,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch |