BBA/BuiltIn: Ensure UDP ports are open
This commit is contained in:
parent
a81f3a95db
commit
18b8f147ab
|
@ -464,11 +464,7 @@ void CEXIETHERNET::BuiltInBBAInterface::HandleUDPFrame(const Common::UDPPacket&
|
|||
ERROR_LOG_FMT(SP1, "Couldn't open UDP socket");
|
||||
return;
|
||||
}
|
||||
if (ntohs(udp_header.destination_port) == 1900)
|
||||
{
|
||||
InitUDPPort(26512); // MK DD and 1080
|
||||
InitUDPPort(26502); // Air Ride
|
||||
if (ntohs(udp_header.length) > 150)
|
||||
if (ntohs(udp_header.destination_port) == 1900 && ntohs(udp_header.length) > 150)
|
||||
{
|
||||
// Quick hack to unlock the connection, throw it back at him
|
||||
Common::UDPPacket reply = packet;
|
||||
|
@ -483,7 +479,6 @@ void CEXIETHERNET::BuiltInBBAInterface::HandleUDPFrame(const Common::UDPPacket&
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ntohs(udp_header.destination_port) == 53)
|
||||
target = sf::IpAddress(m_dns_ip.c_str()); // dns server ip
|
||||
else if (ip_header.destination_addr == Common::IP_ADDR_SSDP)
|
||||
|
@ -670,6 +665,10 @@ bool CEXIETHERNET::BuiltInBBAInterface::RecvInit()
|
|||
|
||||
void CEXIETHERNET::BuiltInBBAInterface::RecvStart()
|
||||
{
|
||||
if (m_read_enabled.IsSet())
|
||||
return;
|
||||
InitUDPPort(26502); // Kirby Air Ride
|
||||
InitUDPPort(26512); // Mario Kart: Double Dash!! and 1080° Avalanche
|
||||
m_read_enabled.Set();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue