mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-12 20:20:52 +08:00
minor logic revisions
This commit is contained in:
@@ -209,11 +209,9 @@ func GetPeerUpdate(node *models.Node) (models.PeerUpdate, error) {
|
||||
// set_local
|
||||
if node.LocalAddress != peer.LocalAddress && peer.LocalAddress != "" {
|
||||
peer.Endpoint = peer.LocalAddress
|
||||
} else {
|
||||
continue
|
||||
}
|
||||
if peer.LocalListenPort != 0 {
|
||||
peer.ListenPort = peer.LocalListenPort
|
||||
}
|
||||
} else {
|
||||
continue
|
||||
}
|
||||
|
@@ -225,10 +225,6 @@ func GetServerPeers(serverNode *models.Node) ([]wgtypes.PeerConfig, bool, []stri
|
||||
if serverNode.PublicKey == node.PublicKey {
|
||||
continue
|
||||
}
|
||||
/*
|
||||
// Test This: Removed logic to set local address for nodes on same network as server
|
||||
// This may be causing issues setting nodes on server currently
|
||||
// Removing may fix but could cause other issues
|
||||
if serverNode.Endpoint == node.Endpoint {
|
||||
if serverNode.LocalAddress != node.LocalAddress && node.LocalAddress != "" {
|
||||
node.Endpoint = node.LocalAddress
|
||||
@@ -236,7 +232,6 @@ func GetServerPeers(serverNode *models.Node) ([]wgtypes.PeerConfig, bool, []stri
|
||||
continue
|
||||
}
|
||||
}
|
||||
*/
|
||||
if currentNetworkACL != nil && currentNetworkACL.IsAllowed(acls.AclID(serverNode.ID), acls.AclID(node.ID)) {
|
||||
continue
|
||||
}
|
||||
|
Reference in New Issue
Block a user