|  | @@ -55,11 +55,12 @@ struct tcpip_protocol udp_protocol;
 | 
		
	
		
			
			| 55 | 55 |   */
 | 
		
	
		
			
			| 56 | 56 |  static int udp_bind ( struct udp_connection *udp ) {
 | 
		
	
		
			
			| 57 | 57 |  	struct udp_connection *existing;
 | 
		
	
		
			
			| 58 |  | -	static uint16_t try_port = 1024;
 | 
		
	
		
			
			|  | 58 | +	static uint16_t try_port = 1023;
 | 
		
	
		
			
			| 59 | 59 |  
 | 
		
	
		
			
			| 60 | 60 |  	/* If no port specified, find the first available port */
 | 
		
	
		
			
			| 61 | 61 |  	if ( ! udp->local.st_port ) {
 | 
		
	
		
			
			| 62 |  | -		for ( ; try_port ; try_port++ ) {
 | 
		
	
		
			
			|  | 62 | +		while ( try_port ) {
 | 
		
	
		
			
			|  | 63 | +			try_port++;
 | 
		
	
		
			
			| 63 | 64 |  			if ( try_port < 1024 )
 | 
		
	
		
			
			| 64 | 65 |  				continue;
 | 
		
	
		
			
			| 65 | 66 |  			udp->local.st_port = htons ( try_port );
 |