mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-10-31 13:10:19 -04:00 
			
		
		
		
	Disallow sending UDP Message Protocol traffic to broadcast address
This commit is contained in:
		
							parent
							
								
									ff6f01c6b5
								
							
						
					
					
						commit
						e538ce9294
					
				| @ -148,6 +148,13 @@ void MessageClient::impl::start () | ||||
|       return; | ||||
|     } | ||||
| 
 | ||||
|   if (is_broadcast_address (server_)) | ||||
|     { | ||||
|       Q_EMIT self_->error ("IPv4 broadcast not supported, please specify the loop-back address, a server host address, or multicast group address"); | ||||
|       pending_messages_.clear (); // discard
 | ||||
|       return; | ||||
|     } | ||||
| 
 | ||||
|   if (blocked_addresses_.end () != std::find (blocked_addresses_.begin (), blocked_addresses_.end (), server_)) | ||||
|     { | ||||
|       Q_EMIT self_->error ("UDP server blocked, please try another"); | ||||
| @ -181,13 +188,6 @@ void MessageClient::impl::start () | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|   if (server_.isBroadcast ()) | ||||
|     { | ||||
|       // only allow broadcast on the loopback interface to avoid
 | ||||
|       // flooding the local subnet which may be large with some ISPs
 | ||||
|       //interface_ip.setAddress ("127.0.0.1");
 | ||||
|     } | ||||
| 
 | ||||
|   if (localAddress () != interface_ip) | ||||
|     { | ||||
|       if (UnconnectedState != state () || state ()) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user