summaryrefslogtreecommitdiff
path: root/ldpd/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldpd/util.c')
-rw-r--r--ldpd/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ldpd/util.c b/ldpd/util.c
index b4d74f1950..019d846ada 100644
--- a/ldpd/util.c
+++ b/ldpd/util.c
@@ -182,7 +182,7 @@ ldp_prefixcmp(int af, const union ldpd_addr *a, const union ldpd_addr *b,
case AF_INET:
if (prefixlen == 0)
return (0);
- if (prefixlen > 32)
+ if (prefixlen > IPV4_MAX_BITLEN)
fatalx("ldp_prefixcmp: bad IPv4 prefixlen");
mask = htonl(prefixlen2mask(prefixlen));
aa = htonl(a->v4.s_addr) & mask;
@@ -191,7 +191,7 @@ ldp_prefixcmp(int af, const union ldpd_addr *a, const union ldpd_addr *b,
case AF_INET6:
if (prefixlen == 0)
return (0);
- if (prefixlen > 128)
+ if (prefixlen > IPV6_MAX_BITLEN)
fatalx("ldp_prefixcmp: bad IPv6 prefixlen");
for (i = 0; i < prefixlen / 8; i++)
if (a->v6.s6_addr[i] != b->v6.s6_addr[i])