1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Fix behavior of ipa_opposite().

It was giving wrong results on /30 networks.
This commit is contained in:
Martin Mares
2008-08-25 11:19:49 +00:00
parent 6c36c4b66b
commit 057021df0d
4 changed files with 5 additions and 4 deletions

View File

@@ -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));