Skip to content

Commit

Permalink
Fix test for 240/8 network
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil Jerram committed Jul 13, 2021
1 parent 670b09e commit 4c6f0ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ip.c
Expand Up @@ -90,14 +90,16 @@ ip4_classify(ip4_addr ad)
if (b == 0x7f)
return IADDR_HOST | SCOPE_HOST;
else if ((b == 0x0a) ||
(b == 0xf0) ||
((a & 0xffff0000) == 0xc0a80000) ||
((a & 0xfff00000) == 0xac100000))
return IADDR_HOST | SCOPE_SITE;
else
return IADDR_HOST | SCOPE_UNIVERSE;
}

if (b == 0xf0)
return IADDR_HOST | SCOPE_SITE;

if (b >= 0xe0 && b <= 0xef)
return IADDR_MULTICAST | SCOPE_UNIVERSE;

Expand Down

0 comments on commit 4c6f0ce

Please sign in to comment.