aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/wpa_auth_i.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2017-01-26 15:24:06 (GMT)
committerJouni Malinen <j@w1.fi>2017-01-29 16:41:26 (GMT)
commitcef8fac04b25bb0c648447513aee652b6f828256 (patch)
treefe8a67ef93eb72c86358157bc0e4d567f2bfb658 /src/ap/wpa_auth_i.h
parent30eddf35297a8cb7a48cf8bc8afc18004a51e037 (diff)
downloadhostap-cef8fac04b25bb0c648447513aee652b6f828256.zip
hostap-cef8fac04b25bb0c648447513aee652b6f828256.tar.gz
hostap-cef8fac04b25bb0c648447513aee652b6f828256.tar.bz2
wpa_auth: Make struct wpa_auth_callbacks const
Instead of copying the struct wpa_auth_callbacks, just keep a pointer to it, keep the context pointer separate, and let the user just provide a static const structure. This reduces the attack surface of heap overwrites, since the function pointers move elsewhere. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'src/ap/wpa_auth_i.h')
-rw-r--r--src/ap/wpa_auth_i.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ap/wpa_auth_i.h b/src/ap/wpa_auth_i.h
index 0c5a457..065a624 100644
--- a/src/ap/wpa_auth_i.h
+++ b/src/ap/wpa_auth_i.h
@@ -203,7 +203,8 @@ struct wpa_authenticator {
struct wpa_stsl_negotiation *stsl_negotiations;
struct wpa_auth_config conf;
- struct wpa_auth_callbacks cb;
+ const struct wpa_auth_callbacks *cb;
+ void *cb_ctx;
u8 *wpa_ie;
size_t wpa_ie_len;