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

Support loopback/dummy addresses.

This commit is contained in:
Ondrej Zajicek
2010-05-26 16:09:22 +02:00
parent e0a62ad0f8
commit 691057f033
2 changed files with 15 additions and 4 deletions

View File

@@ -382,10 +382,17 @@ nl_parse_addr(struct nlmsghdr *h)
}
if (i->ifa_prefixlen == BITS_PER_IP_ADDRESS)
{
ifa.flags |= IA_UNNUMBERED;
memcpy(&ifa.opposite, RTA_DATA(a[IFA_ADDRESS]), sizeof(ifa.opposite));
ipa_ntoh(ifa.opposite);
ifa.prefix = ifa.brd = ifa.opposite;
ip_addr addr;
memcpy(&addr, RTA_DATA(a[IFA_ADDRESS]), sizeof(addr));
ipa_ntoh(addr);
ifa.prefix = ifa.brd = addr;
/* It is either a peer address, or loopback/dummy address */
if (!ipa_equal(ifa.ip, addr))
{
ifa.flags |= IA_UNNUMBERED;
ifa.opposite = addr;
}
}
else
{