diff mbox

[2/2] hostapd: fix parsing the das_client option

Message ID 20160726112937.62502-2-nbd@nbd.name
State Accepted
Headers show

Commit Message

Felix Fietkau July 26, 2016, 11:29 a.m. UTC
The musl implementation of inet_aton returns an error if there are any
characters left after the IP address.
When parsing the das_client, split the string at the whitespace
separator to be able to parse the address successfully

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 hostapd/config_file.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 6dc7e8c..c579b28 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -645,6 +645,7 @@  static int hostapd_parse_das_client(struct hostapd_bss_config *bss,
 	if (secret == NULL)
 		return -1;
 
+	*secret = 0;
 	secret++;
 
 	if (hostapd_parse_ip_addr(val, &bss->radius_das_client_addr))