Skip to content

Commit

Permalink
some router IPs can also start with 10
Browse files Browse the repository at this point in the history
  • Loading branch information
tra committed Jan 18, 2025
1 parent 28b0afd commit 7dc280a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/net/CUDPComm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,10 @@ std::string CUDPComm::FormatConnectionTable(CompleteAddress *table) {
}


// the first part of the IP address is 192 (probably a double-NAT situation)
// the first part of the IP address is 192 or 10 (probably a double-NAT situation)
bool CUDPComm::IsDoubleNAT(uint32_t host) {
return (SDL_SwapBE32(host) >> 24) == 192;
uint8_t sub = (SDL_SwapBE32(host) >> 24);
return (sub == 192 || sub == 10);
}

/*
Expand Down

0 comments on commit 7dc280a

Please sign in to comment.