Browse Source

add extra allowed ips of other extclients

abhishek9686 1 year ago
parent
commit
2e5519c388
1 changed files with 7 additions and 0 deletions
  1. 7 0
      logic/extpeers.go

+ 7 - 0
logic/extpeers.go

@@ -67,6 +67,13 @@ func GetEgressRangesOnNetwork(client *models.ExtClient) ([]string, error) {
 			}
 			}
 		}
 		}
 	}
 	}
+	extclients := GetGwExtclients(client.IngressGatewayID, client.Network)
+	for _, extclient := range extclients {
+		if extclient.ClientID == client.ClientID {
+			continue
+		}
+		result = append(result, extclient.ExtraAllowedIPs...)
+	}
 
 
 	return result, nil
 	return result, nil
 }
 }