From 1ade2ad80fa0acc770a2b738c291c35bd22a7201 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Tue, 17 Dec 2024 15:39:08 +0100 Subject: [PATCH] ensure forced tags are added Signed-off-by: Kristoffer Dalby --- hscontrol/grpcv1.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hscontrol/grpcv1.go b/hscontrol/grpcv1.go index 02fcd3db..7daa8478 100644 --- a/hscontrol/grpcv1.go +++ b/hscontrol/grpcv1.go @@ -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 }