wgengine/magicsock: rename opts.PacketListener to TestOnlyPacketListener.

The docstring said it was meant for use in tests, but it's specifically a
special codepath that is _only_ used in tests, so make the claim stronger.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2021-08-25 22:26:25 -07:00
committed by Dave Anderson
parent 8049063d35
commit 58c1f7d51a
2 changed files with 15 additions and 15 deletions

View File

@ -145,8 +145,8 @@ func newMagicStack(t testing.TB, logf logger.Logf, l nettype.PacketListener, der
epCh := make(chan []tailcfg.Endpoint, 100) // arbitrary
conn, err := NewConn(Options{
Logf: logf,
PacketListener: l,
Logf: logf,
TestOnlyPacketListener: l,
EndpointsFunc: func(eps []tailcfg.Endpoint) {
epCh <- eps
},