Update packetfilter when peers change
Previously we did not update the packet filter when nodes changed, which would cause new nodes to be missing from packet filters of old nodes. Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
a8079a2096
commit
3b0749a320
2 changed files with 28 additions and 13 deletions
|
@ -353,3 +353,13 @@ func (machines MachinesP) String() string {
|
|||
|
||||
return fmt.Sprintf("[ %s ](%d)", strings.Join(temp, ", "), len(temp))
|
||||
}
|
||||
|
||||
func (machines Machines) IDMap() map[uint64]Machine {
|
||||
ret := map[uint64]Machine{}
|
||||
|
||||
for _, machine := range machines {
|
||||
ret[machine.ID] = machine
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue