dsnet / udptunnel

Daemon for creating a simple VPN over UDP.
BSD 3-Clause "New" or "Revised" License
172 stars 31 forks source link

Initial address resolution should not fail fatally #7

Open dsnet opened 6 years ago

dsnet commented 6 years ago

In this logic: https://github.com/dsnet/udptunnel/blob/f0061804a690179a044286f40ab715b4c96e98ab/tunnel.go#L131

We try to resolve the remote address at start-up. However, if the network is not initialized yet, then it is possible that this returns an error and the daemon fails fatally early on. This should be more graceful where it still continues into its tunneling logic (even if the remote endpoint is unknown) and defer proper resolution until later.