mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 10:18:21 -05:00
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 <nbd@nbd.name>
This commit is contained in:
parent
4fe726e2d7
commit
79931efa0d
@ -636,8 +636,7 @@ hostapd_parse_radius_attr(const char *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int hostapd_parse_das_client(struct hostapd_bss_config *bss,
|
static int hostapd_parse_das_client(struct hostapd_bss_config *bss, char *val)
|
||||||
const char *val)
|
|
||||||
{
|
{
|
||||||
char *secret;
|
char *secret;
|
||||||
|
|
||||||
@ -645,7 +644,7 @@ static int hostapd_parse_das_client(struct hostapd_bss_config *bss,
|
|||||||
if (secret == NULL)
|
if (secret == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
secret++;
|
*secret++ = '\0';
|
||||||
|
|
||||||
if (hostapd_parse_ip_addr(val, &bss->radius_das_client_addr))
|
if (hostapd_parse_ip_addr(val, &bss->radius_das_client_addr))
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user