summaryrefslogtreecommitdiff
path: root/lib/ip.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ip.c')
-rw-r--r--lib/ip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ip.c b/lib/ip.c
index 2061a1f7..2050d19e 100644
--- a/lib/ip.c
+++ b/lib/ip.c
@@ -364,7 +364,9 @@ ip4_class_mask(ip4_addr ad)
{
u32 m, a = _I(ad);
- if (a < 0x80000000)
+ if (a == 0x00000000)
+ m = 0x00000000;
+ else if (a < 0x80000000)
m = 0xff000000;
else if (a < 0xc0000000)
m = 0xffff0000;