aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuardNetworkExtension/PacketTunnelSettingsGenerator.swift
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2019-01-22 04:06:27 +0530
committerRoopesh Chander <roop@roopc.net>2019-01-22 04:06:37 +0530
commit273ee04450b776bb5456c75ef17caa2e9e5ed2e7 (patch)
tree722f2ed10ef9357a456561bd9552fe69d7316671 /WireGuard/WireGuardNetworkExtension/PacketTunnelSettingsGenerator.swift
parentmacOS: Tunnel edit: actually clean up error handling (diff)
downloadwireguard-apple-273ee04450b776bb5456c75ef17caa2e9e5ed2e7.tar.xz
wireguard-apple-273ee04450b776bb5456c75ef17caa2e9e5ed2e7.zip
Better os() directives
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r--WireGuard/WireGuardNetworkExtension/PacketTunnelSettingsGenerator.swift4
1 files changed, 3 insertions, 1 deletions
diff --git a/WireGuard/WireGuardNetworkExtension/PacketTunnelSettingsGenerator.swift b/WireGuard/WireGuardNetworkExtension/PacketTunnelSettingsGenerator.swift
index a1f90f1d..02588c33 100644
--- a/WireGuard/WireGuardNetworkExtension/PacketTunnelSettingsGenerator.swift
+++ b/WireGuard/WireGuardNetworkExtension/PacketTunnelSettingsGenerator.swift
@@ -81,8 +81,10 @@ class PacketTunnelSettingsGenerator {
if mtu == 0 {
#if os(iOS)
networkSettings.mtu = NSNumber(value: 1280)
- #elseif os(OSX)
+ #elseif os(macOS)
networkSettings.tunnelOverheadBytes = 80
+ #else
+ #error("Unimplemented")
#endif
} else {
networkSettings.mtu = NSNumber(value: mtu)