diff options
author | vize <vize> | 2007-08-10 06:25:20 +0000 |
---|---|---|
committer | vize <vize> | 2007-08-10 06:25:20 +0000 |
commit | 2707a5a83925d6e7b1e9b55705dc08b37a45bf05 (patch) | |
tree | 0e55409ae7f44df84c27379452284678cb205fe1 /zebra | |
parent | d55e4621c03daa3440bbdcb1e9b1fc8055aff032 (diff) | |
download | quagga-2707a5a83925d6e7b1e9b55705dc08b37a45bf05.tar.bz2 quagga-2707a5a83925d6e7b1e9b55705dc08b37a45bf05.tar.xz |
Use the proper field length for the peer's address (netlink_interface_addr)
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/ChangeLog | 5 | ||||
-rw-r--r-- | zebra/rt_netlink.c | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/zebra/ChangeLog b/zebra/ChangeLog index 9bd775e9..f6dea442 100644 --- a/zebra/ChangeLog +++ b/zebra/ChangeLog @@ -1,3 +1,8 @@ +2007-08-10 Emmanuel Vize <emmanuel.vize@6wind.com> + + * rt_netlink.c: (netlink_interface_addr) Use the appropriate field length for the address + (acknowledge Andy's comment). + 2007-08-06 Denis Ovsienko * zebra_rib.c: (general) Add extra debug logging for RIB and diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 3b602c45..5b592f94 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -647,12 +647,8 @@ netlink_interface_addr (struct sockaddr_nl *snl, struct nlmsghdr *h) addr = (tb[IFA_LOCAL] ? RTA_DATA(tb[IFA_LOCAL]) : NULL); /* is there a peer address? */ - /* N.B. I do not understand why the memcmp compares 4 bytes regardless - of address family, but this is exactly how it appears in - print_addrinfo. I wonder if it should be RTA_PAYLOAD(tb[IFA_ADDRESS]) - instead of 4... */ if (tb[IFA_ADDRESS] && - memcmp(RTA_DATA(tb[IFA_ADDRESS]), RTA_DATA(tb[IFA_LOCAL]), 4)) + memcmp(RTA_DATA(tb[IFA_ADDRESS]), RTA_DATA(tb[IFA_LOCAL]), RTA_PAYLOAD(tb[IFA_ADDRESS]))) { broad = RTA_DATA(tb[IFA_ADDRESS]); SET_FLAG (flags, ZEBRA_IFA_PEER); |