From: Felix Fietkau Date: Tue, 26 Jul 2016 11:29:37 +0000 (+0200) Subject: hostapd: Fix parsing the das_client option X-Git-Tag: hostap_2_6~130 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79931efa0de018b287756b6d37a86acfc8dd2468;p=thirdparty%2Fhostap.git hostapd: Fix parsing the das_client option 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 --- diff --git a/hostapd/config_file.c b/hostapd/config_file.c index 6c53151d7..1b506a7af 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -636,8 +636,7 @@ hostapd_parse_radius_attr(const char *value) } -static int hostapd_parse_das_client(struct hostapd_bss_config *bss, - const char *val) +static int hostapd_parse_das_client(struct hostapd_bss_config *bss, char *val) { char *secret; @@ -645,7 +644,7 @@ static int hostapd_parse_das_client(struct hostapd_bss_config *bss, if (secret == NULL) return -1; - secret++; + *secret++ = '\0'; if (hostapd_parse_ip_addr(val, &bss->radius_das_client_addr)) return -1;