When setting up a packet tunnel with a profile that has includeAllNetworks
set to true
, we seemingly cannot send any traffic inside the tunnel using any kind of an API. We've tried using BSD sockets, as we ping a host only reachable within the tunnel to establish whether we have connectivity - this does not work. When using NWConnection
from the Network framework and specifying the required interface via virtualInterface
from the packet tunnel, the connection state never reaches ready. Our interim solution is to, as ridiculous as it sounds, include a whole userspace networking stack so we can produce valid TCP packets just to send into our own tunnel. We require a TCP connection within our own tunnel to do some configuration during tunnel setup. Is there no better solution?
Sorry it’s taken so long to get back to you.
Thanks again for filing FB16748087
. I discussed this with some folks internally and, yeah, as far as we can tell that’s Just A Bug™.
I checked on your bug and it’s landed in the right place. I’ve no info to share as to how things will evolve from there.
I can’t think of any good way to work around it (while I admire the dedication of your ‘embed an entire TCP/IP stack’ workaround, I’m not gonna label that as “good” :-).
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"