From 057021df0d699f9c21368ab0fa51fe821cc9a544 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 25 Aug 2008 11:19:49 +0000 Subject: Fix behavior of ipa_opposite(). It was giving wrong results on /30 networks. --- sysdep/linux/netlink/netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysdep/linux') diff --git a/sysdep/linux/netlink/netlink.c b/sysdep/linux/netlink/netlink.c index a54e115..a70428e 100644 --- a/sysdep/linux/netlink/netlink.c +++ b/sysdep/linux/netlink/netlink.c @@ -377,7 +377,7 @@ nl_parse_addr(struct nlmsghdr *h) ifa.brd = ipa_or(ifa.ip, ipa_not(netmask)); #ifndef IPV6 if (i->ifa_prefixlen == BITS_PER_IP_ADDRESS - 2) - ifa.opposite = ipa_opposite(ifa.ip); + ifa.opposite = ipa_opposite(ifa.ip, i->ifa_prefixlen); if ((ifi->flags & IF_BROADCAST) && a[IFA_BROADCAST]) { memcpy(&xbrd, RTA_DATA(a[IFA_BROADCAST]), sizeof(xbrd)); -- cgit v1.2.3