net/tstun/table: add initial RoutingTable implementation

It is based on `*tempfork/device.AllowedIPs`.

Updates tailscale/corp#8020

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali
2023-03-29 09:49:33 -07:00
committed by Maisem Ali
parent 2522b0615f
commit d1d5d52b2c
2 changed files with 104 additions and 0 deletions

View File

@ -7,8 +7,22 @@ package device
import (
"container/list"
"tailscale.com/types/key"
)
type Peer struct {
trieEntries list.List
key key.NodePublic
}
func NewPeer(k key.NodePublic) *Peer {
return &Peer{
key: k,
}
}
func (p *Peer) Key() key.NodePublic {
return p.key
}