mirror of
https://github.com/tailscale/tailscale.git
synced 2025-11-15 18:25:24 +00:00
wgengine/magicsock: change API to not permit disco key changes
Generate the disco key ourselves and give out the public half instead. Fixes #525
This commit is contained in:
@@ -855,12 +855,11 @@ func initAddrSet(as *AddrSet) {
|
||||
}
|
||||
|
||||
func TestDiscoMessage(t *testing.T) {
|
||||
peer1Priv := key.NewPrivate()
|
||||
peer1Pub := peer1Priv.Public()
|
||||
|
||||
c := newConn()
|
||||
c.logf = t.Logf
|
||||
c.SetDiscoPrivateKey(key.NewPrivate())
|
||||
|
||||
peer1Pub := c.DiscoPublicKey()
|
||||
peer1Priv := c.discoPrivate
|
||||
c.endpointOfDisco = map[tailcfg.DiscoKey]*discoEndpoint{
|
||||
tailcfg.DiscoKey(peer1Pub): &discoEndpoint{
|
||||
// ...
|
||||
|
||||
Reference in New Issue
Block a user