From: Mohammed Shafi Shajakhan Date: Thu, 25 Jun 2015 12:42:49 +0000 (+0530) Subject: hostapd: Add current wpa parameter into GET_CONFIG output X-Git-Tag: hostap_2_5~369 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de7581ef683effefde3d4162c94562fa5a5ced8d;p=thirdparty%2Fhostap.git 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 --- diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c index 9f745f495..5ef35979e 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))