handle route updates correctly
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
c957f893bd
commit
096ac31bb3
3 changed files with 29 additions and 8 deletions
|
@ -278,6 +278,12 @@ func (hsdb *HSDatabase) saveMachineRoutes(machine *types.Machine) error {
|
|||
advertisedRoutes[prefix] = false
|
||||
}
|
||||
|
||||
log.Trace().
|
||||
Str("machine", machine.Hostname).
|
||||
Interface("advertisedRoutes", advertisedRoutes).
|
||||
Interface("currentRoutes", currentRoutes).
|
||||
Msg("updating routes")
|
||||
|
||||
for pos, route := range currentRoutes {
|
||||
if _, ok := advertisedRoutes[netip.Prefix(route.Prefix)]; ok {
|
||||
if !route.Advertised {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue