mirror of
https://github.com/gravitl/netmaker.git
synced 2025-02-26 17:15:23 +08:00
added blank address check on peers
This commit is contained in:
parent
fed4650b3f
commit
5aae277551
1 changed files with 2 additions and 2 deletions
|
@ -93,10 +93,10 @@ func GetNodePeers(network *models.Network, nodeid string, excludeRelayed bool, i
|
|||
if peer.IsIngressGateway == "yes" { // handle ingress stuff
|
||||
if currentExtClients, err := GetExtPeersList(&node); err == nil {
|
||||
for i := range currentExtClients {
|
||||
if network.IsIPv4 == "yes" {
|
||||
if network.IsIPv4 == "yes" && currentExtClients[i].Address != "" {
|
||||
peer.AllowedIPs = append(peer.AllowedIPs, currentExtClients[i].Address)
|
||||
}
|
||||
if network.IsIPv6 == "yes" {
|
||||
if network.IsIPv6 == "yes" && currentExtClients[i].Address6 != "" {
|
||||
peer.AllowedIPs = append(peer.AllowedIPs, currentExtClients[i].Address6)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue