aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface_unix.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-09-27 20:30:20 (GMT)
committerJouni Malinen <j@w1.fi>2013-09-27 20:34:35 (GMT)
commitea61aa1de1887b14440b02de711383d775ecc004 (patch)
tree0a8f9d4b6e5c070c8b2d8ebbc2ff04d1acc85181 /wpa_supplicant/ctrl_iface_unix.c
parent25b65a142dec4770a79f7a17867f0db93111f843 (diff)
downloadhostap-ea61aa1de1887b14440b02de711383d775ecc004.zip
hostap-ea61aa1de1887b14440b02de711383d775ecc004.tar.gz
hostap-ea61aa1de1887b14440b02de711383d775ecc004.tar.bz2
Add no_ctrl_interface config param to clear ctrl_interface
This can be used to override previously set ctrl_interface value in a way that clears the variable to NULL instead of empty string. The only real use case for this is to disable per-interface ctrl_interface from the additional control file (-I<file>) in case ctrl_interface was set in the main configuration file. It should be noted that zero-length ctrl_interface parameter can be used to initiate some control interface backends, so simpler designs were not available for this. The format of the new parameter is not exactly cleanest due to configuration file parsing assumptions. For example: ctrl_interface=.... no_ctrl_interface= would end up with ctrl_interface=NULL. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/ctrl_iface_unix.c')
-rw-r--r--wpa_supplicant/ctrl_iface_unix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wpa_supplicant/ctrl_iface_unix.c b/wpa_supplicant/ctrl_iface_unix.c
index 8abf57d..5fe9a4e 100644
--- a/wpa_supplicant/ctrl_iface_unix.c
+++ b/wpa_supplicant/ctrl_iface_unix.c
@@ -586,6 +586,8 @@ void wpa_supplicant_ctrl_iface_deinit(struct ctrl_iface_priv *priv)
os_free(fname);
}
+ if (priv->wpa_s->conf->ctrl_interface == NULL)
+ goto free_dst;
buf = os_strdup(priv->wpa_s->conf->ctrl_interface);
if (buf == NULL)
goto free_dst;