I've implemented a custom VPN for macOS (system extension, Packet Tunnel Provider). I've configured disconnectOnSleep = false, and at the Provider I've implemented the sleep() and wake() functions.
At the wake() func, I'm trying to re-establish the connection, and most of the time it's working well.
However, there are times when even after wake() is called, it seems that the interfaces aren't ready/available, and I'm getting "Network is unreachable" errors (I'm working with BSD Sockets).
- Any idea why the interfaces aren't available at this point, after wake() had been called?
- Any idea on how to be updated when the interfaces are available?