net/{packet,tstun},wgengine: update disco key when receiving via TSMP (#18158)
When receiving a TSMPDiscoAdvertisement from peer, update the discokey for said peer. Some parts taken from: https://github.com/tailscale/tailscale/pull/18073/ Updates #12639 Co-authored-by: James Tucker <james@tailscale.com>
This commit is contained in:
+3
-1
@@ -1126,8 +1126,10 @@ func (t *Wrapper) injectedRead(res tunInjectedRead, outBuffs [][]byte, sizes []i
|
||||
return n, err
|
||||
}
|
||||
|
||||
// DiscoKeyAdvertisement is a TSMP message used for distributing disco keys.
|
||||
// This struct is used an an event on the [eventbus.Bus].
|
||||
type DiscoKeyAdvertisement struct {
|
||||
Src netip.Addr
|
||||
Src netip.Addr // Src field is populated by the IP header of the packet, not from the payload itself.
|
||||
Key key.DiscoPublic
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user