added netmaker check on checkin

This commit is contained in:
afeiszli 2021-08-02 14:54:09 -04:00
parent 4385131bc6
commit be1d8d48ea

View file

@ -45,7 +45,7 @@ func GetPeersList(networkName string) ([]models.PeersResponse, error) {
peer.EgressGatewayRanges = strings.Join(node.EgressGatewayRanges, ",")
}
if node.Network == networkName && node.IsPending != "yes" {
if node.UDPHolePunch == "yes" && errN == nil && functions.IsBase64(peer.PublicKey) && functions.CheckEndpoint(peer.Endpoint) {
if node.UDPHolePunch == "yes" && errN == nil && functions.CheckEndpoint(udppeers[peer.PublicKey]) {
endpointstring := udppeers[peer.PublicKey]
endpointarr := strings.Split(endpointstring, ":")
log.Println("got values:",endpointstring,endpointarr)