aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/ctrl_iface.c
diff options
context:
space:
mode:
authorMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>2015-06-25 12:42:49 (GMT)
committerJouni Malinen <j@w1.fi>2015-07-17 21:17:34 (GMT)
commitde7581ef683effefde3d4162c94562fa5a5ced8d (patch)
treefbf7e10b63b7593dcf3d441b1caecf03c40b0cac /hostapd/ctrl_iface.c
parentb8e5426dadd43534fbd7e73bd3c2a5c743d0eccf (diff)
downloadhostap-de7581ef683effefde3d4162c94562fa5a5ced8d.zip
hostap-de7581ef683effefde3d4162c94562fa5a5ced8d.tar.gz
hostap-de7581ef683effefde3d4162c94562fa5a5ced8d.tar.bz2
hostapd: Add current wpa parameter into GET_CONFIG output
This can be used, e.g., by an action script to update new WPS settings for the AP. Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
Diffstat (limited to 'hostapd/ctrl_iface.c')
-rw-r--r--hostapd/ctrl_iface.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index 9f745f4..5ef3597 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -1107,6 +1107,13 @@ static int hostapd_ctrl_iface_get_config(struct hostapd_data *hapd,
}
#endif /* CONFIG_WPS */
+ if (hapd->conf->wpa) {
+ ret = os_snprintf(pos, end - pos, "wpa=%d\n", hapd->conf->wpa);
+ if (os_snprintf_error(end - pos, ret))
+ return pos - buf;
+ pos += ret;
+ }
+
if (hapd->conf->wpa && hapd->conf->wpa_key_mgmt) {
ret = os_snprintf(pos, end - pos, "key_mgmt=");
if (os_snprintf_error(end - pos, ret))