When multiple GotaTun devices start with port 0, their UDP sockets use SO_REUSEADDR. The OS can then assign the same ephemeral port to more than one device. Incoming packets go to one socket, leaving the other device running but unable to receive replies.
I reproduced this on Linux with pools of 200 sockets: duplicate ports appeared in 50 out of 100 runs, and packets for a shared port all went to the socket bound last.
When multiple GotaTun devices start with port
0, their UDP sockets useSO_REUSEADDR. The OS can then assign the same ephemeral port to more than one device. Incoming packets go to one socket, leaving the other device running but unable to receive replies.I reproduced this on Linux with pools of 200 sockets: duplicate ports appeared in 50 out of 100 runs, and packets for a shared port all went to the socket bound last.