mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-12-23 19:25:37 -05:00
Disallow sending UDP Message Protocol traffic to broadcast address
This commit is contained in:
parent
a6a176bf6e
commit
698bd23a9c
@ -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…
Reference in New Issue
Block a user