Skip to content

Commit

Permalink
add a conditional around setting LANFilter.AllSegments to make sure i…
Browse files Browse the repository at this point in the history
…t is valid
  • Loading branch information
jmurret committed Jul 14, 2023
1 parent 5208ea9 commit d714773
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion agent/ui_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@ func AgentMembersMapAddrVer(s *HTTPHandlers, req *http.Request) (map[string]stri
filter := consul.LANMemberFilter{
Partition: entMeta.PartitionOrDefault(),
}
filter.AllSegments = true
if acl.IsDefaultPartition(filter.Partition) {
filter.AllSegments = true
}

Check failure on line 196 in agent/ui_endpoint.go

View workflow job for this annotation

GitHub Actions / lint / lint

File is not `gofmt`-ed with `-s` (gofmt)

Check failure on line 196 in agent/ui_endpoint.go

View workflow job for this annotation

GitHub Actions / lint-32bit / lint

File is not `gofmt`-ed with `-s` (gofmt)
lanMembers, err := s.agent.delegate.LANMembers(filter)
if err != nil {
return nil, err
Expand Down

0 comments on commit d714773

Please sign in to comment.