From ea9310403db321427534dd2cf504f2ddaddb5a6b Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 23 Mar 2020 13:19:33 -0700 Subject: [PATCH] wgengine/magicsock: re-STUN on DERP connection death Fixes #201 --- wgengine/magicsock/magicsock.go | 1 + 1 file changed, 1 insertion(+) diff --git a/wgengine/magicsock/magicsock.go b/wgengine/magicsock/magicsock.go index c28afe2e8..ac8a564b2 100644 --- a/wgengine/magicsock/magicsock.go +++ b/wgengine/magicsock/magicsock.go @@ -876,6 +876,7 @@ func (c *Conn) runDerpReader(ctx context.Context, derpFakeAddr *net.UDPAddr, dc return default: } + c.ReSTUN("derp-close") c.logf("[%p] derp.Recv(derp%d): %v", dc, derpFakeAddr.Port, err) time.Sleep(250 * time.Millisecond) continue