feat(client): filter remote IP addresses by family of given local IP address
It is not possible to connect to an IPv4 address from an IPv6 address or vice-versa so don't waste time trying. If no remote addresses match then a "missing connect error" will now occur.
This commit is contained in:
		
				
					committed by
					
						 Sean McArthur
						Sean McArthur
					
				
			
			
				
	
			
			
			
						parent
						
							71d088d3d0
						
					
				
				
					commit
					131962c86a
				
			| @@ -501,7 +501,7 @@ impl ConnectingTcp { | ||||
|         reuse_address: bool, | ||||
|     ) -> ConnectingTcp { | ||||
|         if let Some(fallback_timeout) = fallback_timeout { | ||||
|             let (preferred_addrs, fallback_addrs) = remote_addrs.split_by_preference(); | ||||
|             let (preferred_addrs, fallback_addrs) = remote_addrs.split_by_preference(local_addr); | ||||
|             if fallback_addrs.is_empty() { | ||||
|                 return ConnectingTcp { | ||||
|                     local_addr, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user