commit d6e781f2935dd7786ecc83e17a452f92a62b4252
parent d39ed61754e1ef2a5c62bd8cf8c65b205a83f42e
Author: sin <sin@2f30.org>
Date: Tue, 22 Mar 2016 10:44:43 +0000
Force pointopoint for linux tun
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stun.c b/stun.c
@@ -140,7 +140,7 @@ opentun(char *tundev)
ret = ioctl(s, SIOCGIFFLAGS, &ifr);
if (ret < 0)
err(1, "ioctl: SIOCGIFFLAGS %s", tundev);
- ifr.ifr_flags |= IFF_UP | IFF_RUNNING;
+ ifr.ifr_flags |= IFF_UP | IFF_RUNNING | IFF_POINTOPOINT;
ret = ioctl(s, SIOCSIFFLAGS, &ifr);
if (ret < 0)
err(1, "ioctl: SIOCSIFFLAGS %s", tundev);