aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-08-25 21:54:22 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2020-08-25 21:54:22 +0200
commit9a0d65e2afbd6e418c883e0de8555b4fac29f1d5 (patch)
treecb53dba886fa5341e82187e39bd321b23b9c219a
parentversion: bump (diff)
downloadwireguard-tools-9a0d65e2afbd6e418c883e0de8555b4fac29f1d5.tar.xz
wireguard-tools-9a0d65e2afbd6e418c883e0de8555b4fac29f1d5.zip
wg-quick: android: use iproute2 to bring up interface instead of ndc
Android 11's ndc regresses even more, but it turns out that netd doesn't need to track up/down state via direct invocation, so just set the interface up by way of normal iproute2. Reported-by: Harsh Shandilya <me@msfjarvis.dev> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--src/wg-quick/android.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wg-quick/android.c b/src/wg-quick/android.c
index 49ae1e3..2ad107e 100644
--- a/src/wg-quick/android.c
+++ b/src/wg-quick/android.c
@@ -726,7 +726,7 @@ static void up_if(unsigned int *netid, const char *iface, uint16_t listen_port)
cmd("iptables -I INPUT 1 -p udp --dport %u -j ACCEPT -m comment --comment \"wireguard rule %s\"", listen_port, iface);
cmd("ip6tables -I INPUT 1 -p udp --dport %u -j %s -m comment --comment \"wireguard rule %s\"", listen_port, should_block_ipv6(iface) ? "DROP" : "ACCEPT", iface);
}
- cndc("interface setcfg %s up", iface);
+ cmd("ip link set up dev %s", iface);
cndc("network create %u vpn 1 1", *netid);
cndc("network interface add %u %s", *netid, iface);
}