mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-25 20:57:31 +00:00
ipn/ipnstate: use key.NodePublic instead of the generic key.Public.
Updates #3206. Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:

committed by
Dave Anderson

parent
ebae0d95d0
commit
c1d009b9e9
@@ -3081,7 +3081,11 @@ func (c *Conn) UpdateStatus(sb *ipnstate.StatusBuilder) {
|
||||
}
|
||||
|
||||
sb.MutateSelfStatus(func(ss *ipnstate.PeerStatus) {
|
||||
ss.PublicKey = c.privateKey.Public()
|
||||
if !c.privateKey.IsZero() {
|
||||
ss.PublicKey = key.NodePrivateFromRaw32(mem.B(c.privateKey[:])).Public()
|
||||
} else {
|
||||
ss.PublicKey = key.NodePublic{}
|
||||
}
|
||||
ss.Addrs = make([]string, 0, len(c.lastEndpoints))
|
||||
for _, ep := range c.lastEndpoints {
|
||||
ss.Addrs = append(ss.Addrs, ep.Addr.String())
|
||||
@@ -3113,7 +3117,7 @@ func (c *Conn) UpdateStatus(sb *ipnstate.StatusBuilder) {
|
||||
ps := &ipnstate.PeerStatus{InMagicSock: true}
|
||||
//ps.Addrs = append(ps.Addrs, n.Endpoints...)
|
||||
ep.populatePeerStatus(ps)
|
||||
sb.AddPeer(key.Public(ep.publicKey), ps)
|
||||
sb.AddPeer(key.NodePublicFromRaw32(mem.B(ep.publicKey[:])), ps)
|
||||
})
|
||||
|
||||
c.foreachActiveDerpSortedLocked(func(node int, ad activeDerp) {
|
||||
|
Reference in New Issue
Block a user