mirror of
				https://github.com/gravitl/netmaker.git
				synced 2025-11-01 04:32:40 +08:00 
			
		
		
		
	fix interation logic
This commit is contained in:
		| @@ -271,8 +271,8 @@ func GetAllowedIPs(node, peer *models.Node) []net.IPNet { | ||||
| 		egressIPs := getEgressIPs(node, peer) | ||||
| 		// remove internet gateway if server | ||||
| 		if node.IsServer == "yes" { | ||||
| 			for i, ip := range egressIPs { | ||||
| 				if ip.IP.String() == "0.0.0.0/0" || ip.IP.String() == "::/0" { | ||||
| 			for i := len(egressIPs) - 1; i <= 0; i-- { | ||||
| 				if egressIPs[i].IP.String() == "0.0.0.0/0" || egressIPs[i].IP.String() == "::/0" { | ||||
| 					egressIPs = append(egressIPs[:i], egressIPs[i+1:]...) | ||||
| 				} | ||||
| 			} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Matthew R. Kasun
					Matthew R. Kasun