summaryrefslogtreecommitdiff
path: root/sysdep/linux/netlink
diff options
context:
space:
mode:
authorOndrej Filip <feela@majklik.network.cz>2010-04-19 16:10:20 +0200
committerOndrej Filip <feela@majklik.network.cz>2010-04-19 16:10:20 +0200
commit6bc414d619e1d8710990e89e5085d18e2d5c544c (patch)
tree6b9558aa81a5ee5844ca383bfc7b4d81429c799d /sysdep/linux/netlink
parentd759c1a6f834cd8a8a7c264d159b9ceb246aec2a (diff)
It seems that prefixes /31 and /127 are valid and used in this strange world.
Diffstat (limited to 'sysdep/linux/netlink')
-rw-r--r--sysdep/linux/netlink/netlink.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sysdep/linux/netlink/netlink.c b/sysdep/linux/netlink/netlink.c
index f31ef9f7..aa0f2c45 100644
--- a/sysdep/linux/netlink/netlink.c
+++ b/sysdep/linux/netlink/netlink.c
@@ -373,8 +373,7 @@ nl_parse_addr(struct nlmsghdr *h)
memcpy(&ifa.ip, RTA_DATA(a[IFA_LOCAL] ? : a[IFA_ADDRESS]), sizeof(ifa.ip));
ipa_ntoh(ifa.ip);
ifa.pxlen = i->ifa_prefixlen;
- if (i->ifa_prefixlen > BITS_PER_IP_ADDRESS ||
- i->ifa_prefixlen == BITS_PER_IP_ADDRESS - 1)
+ if (i->ifa_prefixlen > BITS_PER_IP_ADDRESS)
{
log(L_ERR "KIF: Invalid prefix length for interface %s: %d", ifi->name, i->ifa_prefixlen);
new = 0;