mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-17 22:31:23 +08:00
Merge branch 'NET-1613' of https://github.com/gravitl/netmaker into NET-1615-ext
This commit is contained in:
@@ -171,6 +171,9 @@ func updateNodes() {
|
|||||||
if node.IsIngressGateway {
|
if node.IsIngressGateway {
|
||||||
tagID := models.TagID(fmt.Sprintf("%s.%s", node.Network,
|
tagID := models.TagID(fmt.Sprintf("%s.%s", node.Network,
|
||||||
models.RemoteAccessTagName))
|
models.RemoteAccessTagName))
|
||||||
|
if node.Tags == nil {
|
||||||
|
node.Tags = make(map[models.TagID]struct{})
|
||||||
|
}
|
||||||
if _, ok := node.Tags[tagID]; !ok {
|
if _, ok := node.Tags[tagID]; !ok {
|
||||||
node.Tags[tagID] = struct{}{}
|
node.Tags[tagID] = struct{}{}
|
||||||
logic.UpsertNode(&node)
|
logic.UpsertNode(&node)
|
||||||
@@ -186,6 +189,18 @@ func updateNodes() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
extclients, _ := logic.GetAllExtClients()
|
||||||
|
for _, extclient := range extclients {
|
||||||
|
tagID := models.TagID(fmt.Sprintf("%s.%s", extclient.Network,
|
||||||
|
models.RemoteAccessTagName))
|
||||||
|
if extclient.Tags == nil {
|
||||||
|
extclient.Tags = make(map[models.TagID]struct{})
|
||||||
|
}
|
||||||
|
if _, ok := extclient.Tags[tagID]; !ok {
|
||||||
|
extclient.Tags[tagID] = struct{}{}
|
||||||
|
logic.SaveExtClient(&extclient)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func removeInterGw(egressRanges []string) ([]string, bool) {
|
func removeInterGw(egressRanges []string) ([]string, bool) {
|
||||||
|
Reference in New Issue
Block a user