diff options
Diffstat (limited to '')
-rw-r--r-- | host.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -106,7 +106,7 @@ unsigned long long int ri (unsigned long long int v, int s) { /* 000 100 010 110 unsigned long long int localnumber (struct in_net n) { unsigned long long int r = 0; for (int i = 31; i >= 0; i--) - if (n.mask.s_addr & 1 << i && n.addr.s_addr & 1 << i) + if (!(ntohl(n.mask.s_addr) & 1 << i) && ntohl(n.addr.s_addr) & 1 << i) r |= 1 << i; return r; } |