Skip to content

Commit 2e47484

Browse files
authored
Merge pull request #3544 from gravitl/release-v1.0.0
Release v1.0.0
2 parents 6741bac + 5be4548 commit 2e47484

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

logic/acls.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -657,12 +657,12 @@ var IsAclPolicyValid = func(acl models.Acl) (err error) {
657657

658658
var IsPeerAllowed = func(node, peer models.Node, checkDefaultPolicy bool) bool {
659659
var nodeId, peerId string
660-
if node.IsGw && peer.IsRelayed && peer.RelayedBy == node.ID.String() {
661-
return true
662-
}
663-
if peer.IsGw && node.IsRelayed && node.RelayedBy == peer.ID.String() {
664-
return true
665-
}
660+
// if node.IsGw && peer.IsRelayed && peer.RelayedBy == node.ID.String() {
661+
// return true
662+
// }
663+
// if peer.IsGw && node.IsRelayed && node.RelayedBy == peer.ID.String() {
664+
// return true
665+
// }
666666
if node.IsStatic {
667667
nodeId = node.StaticNode.ClientID
668668
node = node.StaticNode.ConvertToStaticNode()

mq/handlers.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ func HandleHostCheckin(h, currentHost *models.Host) bool {
281281
(h.ListenPort != 0 && h.ListenPort != currentHost.ListenPort) ||
282282
(h.WgPublicListenPort != 0 && h.WgPublicListenPort != currentHost.WgPublicListenPort) || (!h.EndpointIPv6.Equal(currentHost.EndpointIPv6))
283283
if ifaceDelta { // only save if something changes
284-
if !h.EndpointIP.Equal(currentHost.EndpointIP) || !h.EndpointIPv6.Equal(currentHost.EndpointIPv6) {
284+
if !h.EndpointIP.Equal(currentHost.EndpointIP) || !h.EndpointIPv6.Equal(currentHost.EndpointIPv6) || currentHost.Location == "" {
285285
if h.EndpointIP != nil {
286286
h.Location = logic.GetHostLocInfo(h.EndpointIP.String(), os.Getenv("IP_INFO_TOKEN"))
287287
} else if h.EndpointIPv6 != nil {
@@ -293,6 +293,9 @@ func HandleHostCheckin(h, currentHost *models.Host) bool {
293293
currentHost.Interfaces = h.Interfaces
294294
currentHost.DefaultInterface = h.DefaultInterface
295295
currentHost.NatType = h.NatType
296+
if h.Location != "" {
297+
currentHost.Location = h.Location
298+
}
296299
if h.ListenPort != 0 {
297300
currentHost.ListenPort = h.ListenPort
298301
}

0 commit comments

Comments
 (0)