mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-07 08:07:42 +00:00
derp: remove package shadowing of types/key.
Updates #3206 Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
parent
37c150aee1
commit
1f06f77dcb
@ -1160,7 +1160,7 @@ func (s *Server) recvPacket(br *bufio.Reader, frameLen uint32) (dstKey key.NodeP
|
|||||||
return dstKey, contents, nil
|
return dstKey, contents, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// zpub is the key.Public zero value.
|
// zpub is the key.NodePublic zero value.
|
||||||
var zpub key.NodePublic
|
var zpub key.NodePublic
|
||||||
|
|
||||||
func (s *Server) recvForwardPacket(br *bufio.Reader, frameLen uint32) (srcKey, dstKey key.NodePublic, contents []byte, err error) {
|
func (s *Server) recvForwardPacket(br *bufio.Reader, frameLen uint32) (srcKey, dstKey key.NodePublic, contents []byte, err error) {
|
||||||
|
@ -502,9 +502,9 @@ func newTestClient(t *testing.T, ts *testServer, name string, newClient func(net
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
key := key.NewNode()
|
k := key.NewNode()
|
||||||
ts.addKeyName(key.Public(), name)
|
ts.addKeyName(k.Public(), name)
|
||||||
c, err := newClient(nc, key, logger.WithPrefix(t.Logf, "client-"+name+": "))
|
c, err := newClient(nc, k, logger.WithPrefix(t.Logf, "client-"+name+": "))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
@ -513,7 +513,7 @@ func newTestClient(t *testing.T, ts *testServer, name string, newClient func(net
|
|||||||
nc: nc,
|
nc: nc,
|
||||||
c: c,
|
c: c,
|
||||||
ts: ts,
|
ts: ts,
|
||||||
pub: key.Public(),
|
pub: k.Public(),
|
||||||
}
|
}
|
||||||
ts.addTestClient(tc)
|
ts.addTestClient(tc)
|
||||||
return tc
|
return tc
|
||||||
@ -1140,8 +1140,8 @@ func benchmarkSendRecvSize(b *testing.B, packetSize int) {
|
|||||||
s := NewServer(serverPrivateKey, logger.Discard)
|
s := NewServer(serverPrivateKey, logger.Discard)
|
||||||
defer s.Close()
|
defer s.Close()
|
||||||
|
|
||||||
key := key.NewNode()
|
k := key.NewNode()
|
||||||
clientKey := key.Public()
|
clientKey := k.Public()
|
||||||
|
|
||||||
ln, err := net.Listen("tcp", "127.0.0.1:0")
|
ln, err := net.Listen("tcp", "127.0.0.1:0")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -1165,7 +1165,7 @@ func benchmarkSendRecvSize(b *testing.B, packetSize int) {
|
|||||||
go s.Accept(connIn, brwServer, "test-client")
|
go s.Accept(connIn, brwServer, "test-client")
|
||||||
|
|
||||||
brw := bufio.NewReadWriter(bufio.NewReader(connOut), bufio.NewWriter(connOut))
|
brw := bufio.NewReadWriter(bufio.NewReader(connOut), bufio.NewWriter(connOut))
|
||||||
client, err := NewClient(key, connOut, brw, logger.Discard)
|
client, err := NewClient(k, connOut, brw, logger.Discard)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
b.Fatalf("client: %v", err)
|
b.Fatalf("client: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user