1
0
mirror of https://github.com/juanfont/headscale.git synced 2025-09-11 17:53:10 +02:00

ensure forced tags are added

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
Kristoffer Dalby 2024-12-17 15:39:08 +01:00
parent e6fc7851e7
commit 1ade2ad80f
No known key found for this signature in database

View File

@ -13,6 +13,7 @@ import (
"github.com/puzpuzpuz/xsync/v3"
"github.com/rs/zerolog/log"
"github.com/samber/lo"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/timestamppb"
@ -487,8 +488,8 @@ func nodesToProto(polMan policy.PolicyManager, isLikelyConnected *xsync.MapOf[ty
resp.Online = true
}
validTags := polMan.Tags(node)
resp.ValidTags = validTags
tags := polMan.Tags(node)
resp.ValidTags = lo.Uniq(append(tags, node.ForcedTags...))
response[index] = resp
}