aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuardNetworkExtension
diff options
context:
space:
mode:
authorJeroen Leenarts <jeroen.leenarts@gmail.com>2018-08-05 22:59:01 +0200
committerJeroen Leenarts <jeroen.leenarts@gmail.com>2018-08-05 22:59:01 +0200
commit17d4460df0528ab1c3b604072ead7f3b7a73b916 (patch)
tree1f8e526439faca341ae1532e28dcdc68b586ec0f /WireGuardNetworkExtension
parentSet a tunnel (routing) configuration. Still very rough. (diff)
downloadwireguard-apple-17d4460df0528ab1c3b604072ead7f3b7a73b916.tar.xz
wireguard-apple-17d4460df0528ab1c3b604072ead7f3b7a73b916.zip
A handle of zero is also correct.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'WireGuardNetworkExtension')
-rw-r--r--WireGuardNetworkExtension/WireGuardGoWrapper.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/WireGuardNetworkExtension/WireGuardGoWrapper.m b/WireGuardNetworkExtension/WireGuardGoWrapper.m
index cd684bf..8259b1a 100644
--- a/WireGuardNetworkExtension/WireGuardGoWrapper.m
+++ b/WireGuardNetworkExtension/WireGuardGoWrapper.m
@@ -53,7 +53,7 @@ static void do_log(int level, const char *tag, const char *msg);
self.handle = wgTurnOn((gostring_t){ .p = ifName, .n = interfaceName.length }, (gostring_t){ .p = settings, .n = settingsString.length }, do_read, do_write, (__bridge void *)(self));
- return self.handle > 0;
+ return self.handle >= 0;
}
- (void) turnOff