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, 2 insertions, 2 deletions
diff --git a/lib/ip.c b/lib/ip.c
index 2050d19e..6205915a 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;
}