wg-quick: android: do not choke on empty allowed-ips
Reported-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
1aa8364b17
commit
7e106d3a4c
|
@ -512,9 +512,12 @@ static void set_routes(const char *iface, unsigned int netid)
|
||||||
if (!start)
|
if (!start)
|
||||||
continue;
|
continue;
|
||||||
++start;
|
++start;
|
||||||
for (char *allowedip = strtok(start, " \n"); allowedip; allowedip = strtok(NULL, " \n"))
|
for (char *allowedip = strtok(start, " \n"); allowedip; allowedip = strtok(NULL, " \n")) {
|
||||||
|
if (!strcmp(allowedip, "(none)"))
|
||||||
|
continue;
|
||||||
add_route(iface, netid, allowedip);
|
add_route(iface, netid, allowedip);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void maybe_block_ipv6(const char *iface)
|
static void maybe_block_ipv6(const char *iface)
|
||||||
|
|
Reference in New Issue