wgengine/magicsock: remove Start method from Conn.

Over time, other magicsock refactors have made Start effectively a
no-op, except that some other functions choose to panic if called
before Start.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2021-08-31 18:09:52 -07:00
committed by Dave Anderson
parent 1a899344bd
commit 4c27e2fa22
3 changed files with 3 additions and 26 deletions

View File

@ -154,7 +154,6 @@ func newMagicStack(t testing.TB, logf logger.Logf, l nettype.PacketListener, der
if err != nil {
t.Fatalf("constructing magicsock: %v", err)
}
conn.Start()
conn.SetDERPMap(derpMap)
if err := conn.SetPrivateKey(privateKey); err != nil {
t.Fatalf("setting private key in magicsock: %v", err)
@ -353,7 +352,6 @@ func TestNewConn(t *testing.T) {
defer conn.Close()
conn.SetDERPMap(stuntest.DERPMapOf(stunAddr.String()))
conn.SetPrivateKey(wgkey.Private(key.NewPrivate()))
conn.Start()
go func() {
var pkt [64 << 10]byte
@ -465,7 +463,6 @@ func TestDeviceStartStop(t *testing.T) {
if err != nil {
t.Fatal(err)
}
conn.Start()
defer conn.Close()
tun := tuntest.NewChannelTUN()