aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/config_file.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-02-28 11:55:12 (GMT)
committerJouni Malinen <j@w1.fi>2015-02-28 13:45:16 (GMT)
commitbbee36e316186b53d5b9d97c2248f85120c40107 (patch)
tree3cc6742ff41a648ca33f7466681b2930cc51660e /hostapd/config_file.c
parentefb40081ab1aa6deaffe0bc5bac8ae2453db85b6 (diff)
downloadhostap-bbee36e316186b53d5b9d97c2248f85120c40107.zip
hostap-bbee36e316186b53d5b9d97c2248f85120c40107.tar.gz
hostap-bbee36e316186b53d5b9d97c2248f85120c40107.tar.bz2
Allow RADIUS server address to be replaced
The new hostapd parameters auth_server_addr_replace and acct_server_addr_replace can now be used to replace the configured IP address instead of adding a new RADIUS server. This is mainly useful for testing purposes where the address can be changed over control interface during AP operation. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'hostapd/config_file.c')
-rw-r--r--hostapd/config_file.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 9edbe63..95f3bf2 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -2200,6 +2200,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
return 1;
}
} else if (bss->radius->auth_server &&
+ os_strcmp(buf, "auth_server_addr_replace") == 0) {
+ if (hostapd_parse_ip_addr(pos,
+ &bss->radius->auth_server->addr)) {
+ wpa_printf(MSG_ERROR,
+ "Line %d: invalid IP address '%s'",
+ line, pos);
+ return 1;
+ }
+ } else if (bss->radius->auth_server &&
os_strcmp(buf, "auth_server_port") == 0) {
bss->radius->auth_server->port = atoi(pos);
} else if (bss->radius->auth_server &&
@@ -2225,6 +2234,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
return 1;
}
} else if (bss->radius->acct_server &&
+ os_strcmp(buf, "acct_server_addr_replace") == 0) {
+ if (hostapd_parse_ip_addr(pos,
+ &bss->radius->acct_server->addr)) {
+ wpa_printf(MSG_ERROR,
+ "Line %d: invalid IP address '%s'",
+ line, pos);
+ return 1;
+ }
+ } else if (bss->radius->acct_server &&
os_strcmp(buf, "acct_server_port") == 0) {
bss->radius->acct_server->port = atoi(pos);
} else if (bss->radius->acct_server &&