summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFearlessTobi <thm.frey@gmail.com>2022-08-27 03:39:02 +0200
committerFearlessTobi <thm.frey@gmail.com>2022-08-27 03:39:02 +0200
commit339758c9fce9a211f85f62182d8fa0e1115c229b (patch)
tree5c85a041ebfaeba1865cfe21752e54c590e1ce31 /src
parentyuzu: Display current game version in multiplayer room (diff)
downloadyuzu-339758c9fce9a211f85f62182d8fa0e1115c229b.tar
yuzu-339758c9fce9a211f85f62182d8fa0e1115c229b.tar.gz
yuzu-339758c9fce9a211f85f62182d8fa0e1115c229b.tar.bz2
yuzu-339758c9fce9a211f85f62182d8fa0e1115c229b.tar.lz
yuzu-339758c9fce9a211f85f62182d8fa0e1115c229b.tar.xz
yuzu-339758c9fce9a211f85f62182d8fa0e1115c229b.tar.zst
yuzu-339758c9fce9a211f85f62182d8fa0e1115c229b.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/internal_network/socket_proxy.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/internal_network/socket_proxy.cpp b/src/core/internal_network/socket_proxy.cpp
index 49d067f4c..0c746bd82 100644
--- a/src/core/internal_network/socket_proxy.cpp
+++ b/src/core/internal_network/socket_proxy.cpp
@@ -26,6 +26,12 @@ void ProxySocket::HandleProxyPacket(const ProxyPacket& packet) {
closed) {
return;
}
+
+ if (!broadcast && packet.broadcast) {
+ LOG_INFO(Network, "Received broadcast packet, but not configured for broadcast mode");
+ return;
+ }
+
std::lock_guard guard(packets_mutex);
received_packets.push(packet);
}
@@ -203,7 +209,7 @@ std::pair<s32, Errno> ProxySocket::SendTo(u32 flags, const std::vector<u8>& mess
packet.local_endpoint = local_endpoint;
packet.remote_endpoint = *addr;
packet.protocol = protocol;
- packet.broadcast = broadcast;
+ packet.broadcast = broadcast && packet.remote_endpoint.ip[3] == 255;
auto& ip = local_endpoint.ip;
auto ipv4 = Network::GetHostIPv4Address();