Default route population works on Mac!
This commit is contained in:
parent
eb4a78bcc3
commit
1bf1c38b30
4 changed files with 18 additions and 4 deletions
|
@ -279,6 +279,8 @@ bool InetAddress::containsAddress(const InetAddress &addr) const
|
|||
switch(ss_family) {
|
||||
case AF_INET: {
|
||||
const unsigned int bits = netmaskBits();
|
||||
if (bits == 0)
|
||||
return true;
|
||||
return ( (Utils::ntoh((uint32_t)reinterpret_cast<const struct sockaddr_in *>(&addr)->sin_addr.s_addr) >> (32 - bits)) == (Utils::ntoh((uint32_t)reinterpret_cast<const struct sockaddr_in *>(this)->sin_addr.s_addr) >> (32 - bits)) );
|
||||
}
|
||||
case AF_INET6: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue