mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-11 21:27:45 +00:00
handle route updates correctly
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:

committed by
Kristoffer Dalby

parent
c957f893bd
commit
096ac31bb3
@@ -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 {
|
||||
|
Reference in New Issue
Block a user