wgengine/magicsock: set a dummy private key in benchmark.
Magicsock started dropping all traffic internally when Tailscale is shut down, to avoid spurious wireguard logspam. This made the benchmark not receive anything. Setting a dummy private key is sufficient to get magicsock to pass traffic for benchmarking purposes. Fixes #1270. Signed-off-by: David Anderson <danderson@tailscale.com>pull/1279/head
parent
b9c2231fdf
commit
ace57d7627
|
@ -1440,6 +1440,7 @@ func BenchmarkReceiveFrom(b *testing.B) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
conn.SetPrivateKey(wgkey.Private{0: 1})
|
||||||
conn.CreateEndpoint([32]byte{1: 1}, "0000000000000000000000000000000000000000000000000000000000000001.disco.tailscale:12345")
|
conn.CreateEndpoint([32]byte{1: 1}, "0000000000000000000000000000000000000000000000000000000000000001.disco.tailscale:12345")
|
||||||
conn.addValidDiscoPathForTest(discoKey, netaddr.MustParseIPPort(sendConn.LocalAddr().String()))
|
conn.addValidDiscoPathForTest(discoKey, netaddr.MustParseIPPort(sendConn.LocalAddr().String()))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue