BBA/BuiltIn: Ignore UPnP request to itself

This commit is contained in:
Sepalani 2022-09-23 20:54:26 +04:00
parent df53ebb59f
commit 34858e934f

View File

@ -520,6 +520,13 @@ void CEXIETHERNET::BuiltInBBAInterface::HandleUPnPClient()
return; return;
} }
if (m_current_ip == ref->from.sin_addr.s_addr)
{
ref->tcp_socket.disconnect();
WARN_LOG_FMT(SP1, "Ignoring UPnP request to itself");
return;
}
ref->delay = GetTickCountStd(); ref->delay = GetTickCountStd();
ref->ip = ref->from.sin_addr.s_addr; ref->ip = ref->from.sin_addr.s_addr;
ref->local = ref->to.sin_port; ref->local = ref->to.sin_port;