diff --git a/pcsx2/DEV9/Sessions/UDP_Session/UDP_Session.cpp b/pcsx2/DEV9/Sessions/UDP_Session/UDP_Session.cpp index 82cedf4c994be..3633d353dd62d 100644 --- a/pcsx2/DEV9/Sessions/UDP_Session/UDP_Session.cpp +++ b/pcsx2/DEV9/Sessions/UDP_Session/UDP_Session.cpp @@ -36,6 +36,7 @@ namespace Sessions UDP_Session::UDP_Session(ConnectionKey parKey, IP_Address parAdapterIP) : UDP_BaseSession(parKey, parAdapterIP) , isBroadcast(false) + , isMulticast(false) , isFixedPort(false) , deathClockStart(std::chrono::steady_clock::now()) { @@ -180,7 +181,7 @@ namespace Sessions if (!open) return false; - if (isBroadcast || (parDestIP == destIP)) + if (isBroadcast || isMulticast || (parDestIP == destIP)) { deathClockStart.store(std::chrono::steady_clock::now()); return true; @@ -210,13 +211,6 @@ namespace Sessions destPort = udp.destinationPort; srcPort = udp.sourcePort; - // Multicast address start with 0b1110 - if ((destIP.bytes[0] & 0xF0) == 0xE0) - { - isMulticast = true; - Console.Error("DEV9: UDP: Unexpected multicast connection"); - } - int ret; client = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); if (client == INVALID_SOCKET) @@ -259,8 +253,6 @@ namespace Sessions #endif } - pxAssert(isMulticast == false); - sockaddr_in endpoint{}; endpoint.sin_family = AF_INET; endpoint.sin_addr = std::bit_cast(destIP); @@ -297,7 +289,7 @@ namespace Sessions ret = sendto(client, reinterpret_cast(udpPayload->data), udpPayload->GetLength(), 0, reinterpret_cast(&endpoint), sizeof(endpoint)); } - else if (isMulticast | isFixedPort) + else if (isFixedPort) { sockaddr_in endpoint{}; endpoint.sin_family = AF_INET; diff --git a/pcsx2/DEV9/Sessions/UDP_Session/UDP_Session.h b/pcsx2/DEV9/Sessions/UDP_Session/UDP_Session.h index 20b9688c037cb..10530f77a3351 100644 --- a/pcsx2/DEV9/Sessions/UDP_Session/UDP_Session.h +++ b/pcsx2/DEV9/Sessions/UDP_Session/UDP_Session.h @@ -30,7 +30,7 @@ namespace Sessions u16 destPort = 0; // UDP_Session flags const bool isBroadcast; - bool isMulticast = false; + const bool isMulticast; const bool isFixedPort; std::atomic deathClockStart;