From fe9f1a6dedda6bab23cbb605d1cd5db6cd3e2468 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Thu, 5 Nov 2015 12:48:52 +0100 Subject: Initial commit on integrated BIRD New data types net_addr and variants (in lib/net.h) describing network addresses (prefix/pxlen). Modifications of FIB structures to handle these data types and changing everything to use these data types instead of prefix/pxlen pairs where possible. The commit is WiP, some protocols are not yet updated (BGP, Kernel), and the code contains some temporary scaffolding. Comments are welcome. --- lib/ip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/ip.c') diff --git a/lib/ip.c b/lib/ip.c index 3dc8919a..6b0b0bc2 100644 --- a/lib/ip.c +++ b/lib/ip.c @@ -58,7 +58,7 @@ ip6_mkmask(uint n) return a; } -int +uint ip6_masklen(ip6_addr *a) { int i, j, n; @@ -72,7 +72,7 @@ ip6_masklen(ip6_addr *a) n += j; while (++i < 4) if (a->addr[i]) - return -1; + return 255; break; } -- cgit v1.2.3