From 57d95dd0057321113120bae31c0c2bcd377dfbec Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 15 Jan 2021 15:54:45 -0800 Subject: [PATCH] wgengine/magicsock: default legacy networking to off for some tests. Signed-off-by: David Anderson --- wgengine/magicsock/magicsock.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wgengine/magicsock/magicsock.go b/wgengine/magicsock/magicsock.go index 045f0a788..7b7d39b21 100644 --- a/wgengine/magicsock/magicsock.go +++ b/wgengine/magicsock/magicsock.go @@ -415,6 +415,7 @@ func (o *Options) derpActiveFunc() func() { // of NewConn. Mostly for tests. func newConn() *Conn { c := &Conn{ + disableLegacy: true, sendLogLimit: rate.NewLimiter(rate.Every(1*time.Minute), 1), addrsByUDP: make(map[netaddr.IPPort]*addrSet), addrsByKey: make(map[key.Public]*addrSet), @@ -446,6 +447,7 @@ func NewConn(opts Options) (*Conn, error) { c.packetListener = opts.PacketListener c.noteRecvActivity = opts.NoteRecvActivity c.simulatedNetwork = opts.SimulatedNetwork + c.disableLegacy = opts.DisableLegacyNetworking if err := c.initialBind(); err != nil { return nil, err