summaryrefslogtreecommitdiff
path: root/lib/ip.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2015-10-05 12:14:50 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2015-10-05 13:18:10 +0200
commit8465dccb06afffed171dc1e224e4eb5f67cc3326 (patch)
tree9e5209b312ba8b7eabd0f5a22aea4a0888cd8c9f /lib/ip.c
parentc7b99a932cab1873042e356143ab71755920157a (diff)
Major RIP redesign
The new RIP implementation fixes plenty of old bugs and also adds support for many new features: ECMP support, link state support, BFD support, configurable split horizon and more. Most options are now per-interface.
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 e1bfba49..3dc8919a 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;