]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commit
Kit: netcfg: add explicit IP mask routes
authorJason A. Donenfeld <Jason@zx2c4.com>
Fri, 1 Jan 2021 17:26:49 +0000 (18:26 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 1 Jan 2021 17:28:14 +0000 (18:28 +0100)
commit7b5b564a6ee3d3be90cdb56472cd404e8a0eaa18
tree40bcbb9a1877a2bcf33d44187530f4c5ac393293
parent695f868b1fc5645f76e1347f74517811fce97189
Kit: netcfg: add explicit IP mask routes

macOS will use the wrong source address unless we add explicit routes
that mention the self-pointing gateway. Actually, it won't add any
implicit routes on its own, so in order to route the masks of the
addresses, we have to add our own routes explicitly.

However, this still doesn't fix the problem while inside of the network
extension, even though it works outside it.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Sources/WireGuardKit/IPAddressRange.swift
Sources/WireGuardKit/PacketTunnelSettingsGenerator.swift