mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-02 06:08:50 +00:00
Merge pull request #12295 from sepalani/arp-check
BBA/HLE: Fix GC homebrew if_config not working
This commit is contained in:
commit
27be8c087e
1 changed files with 6 additions and 0 deletions
|
@ -143,6 +143,12 @@ void CEXIETHERNET::BuiltInBBAInterface::WriteToQueue(const std::vector<u8>& data
|
||||||
void CEXIETHERNET::BuiltInBBAInterface::HandleARP(const Common::ARPPacket& packet)
|
void CEXIETHERNET::BuiltInBBAInterface::HandleARP(const Common::ARPPacket& packet)
|
||||||
{
|
{
|
||||||
const auto& [hwdata, arpdata] = packet;
|
const auto& [hwdata, arpdata] = packet;
|
||||||
|
if (arpdata.sender_address == m_current_mac && arpdata.sender_ip == 0 &&
|
||||||
|
arpdata.target_ip == m_current_ip)
|
||||||
|
{
|
||||||
|
// Ignore ARP probe to itself (RFC 5227) sometimes used to prevent IP collision
|
||||||
|
return;
|
||||||
|
}
|
||||||
Common::ARPPacket response(m_current_mac, m_router_mac);
|
Common::ARPPacket response(m_current_mac, m_router_mac);
|
||||||
response.arp_header = Common::ARPHeader(arpdata.target_ip, ResolveAddress(arpdata.target_ip),
|
response.arp_header = Common::ARPHeader(arpdata.target_ip, ResolveAddress(arpdata.target_ip),
|
||||||
m_current_ip, m_current_mac);
|
m_current_ip, m_current_mac);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue