mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-23 17:18:42 +00:00
portmap fixes
Change-Id: Ia847580ba523acacadcb5fa8f87ccea98dc7ce41 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
@@ -227,7 +227,7 @@ func ping(ctx context.Context, c *vnet.NodeAgentClient, target netip.Addr) (*ipn
|
||||
n := 0
|
||||
var res *ipnstate.PingResult
|
||||
anyPong := false
|
||||
for {
|
||||
for n < 10 {
|
||||
n++
|
||||
pr, err := c.PingWithOpts(ctx, target, tailcfg.PingDisco, tailscale.PingOpts{})
|
||||
if err != nil {
|
||||
@@ -242,9 +242,16 @@ func ping(ctx context.Context, c *vnet.NodeAgentClient, target netip.Addr) (*ipn
|
||||
if pr.DERPRegionID == 0 {
|
||||
return pr, nil
|
||||
}
|
||||
time.Sleep(time.Second)
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
case <-time.After(time.Second):
|
||||
}
|
||||
res = pr
|
||||
}
|
||||
if res == nil {
|
||||
return nil, errors.New("no ping response")
|
||||
}
|
||||
return res, nil
|
||||
}
|
||||
|
||||
func up(ctx context.Context, c *vnet.NodeAgentClient) error {
|
||||
@@ -270,7 +277,6 @@ func TestEasyEasy(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEasyHard(t *testing.T) {
|
||||
t.Skip()
|
||||
nt := newNatTest(t)
|
||||
nt.runTest(easy, hard)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user