summaryrefslogtreecommitdiffhomepage
path: root/src/odhcpd.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2015-07-07 16:04:05 +0200
committerSteven Barth <steven@midlink.org>2015-07-07 16:04:05 +0200
commit866c49ac4436e9cdddea10284902354793b8fe7e (patch)
tree9c0ba69bd5ff1b78ac1b43fac19dd1401d043818 /src/odhcpd.c
parentfd3e3bbc461fcbbaefff9339da2e9b6c85a5b4a1 (diff)
main: fix missing parameter while iterating neighbors
Diffstat (limited to 'src/odhcpd.c')
-rw-r--r--src/odhcpd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/odhcpd.c b/src/odhcpd.c
index 3fb3009..9374052 100644
--- a/src/odhcpd.c
+++ b/src/odhcpd.c
@@ -234,9 +234,9 @@ int odhcpd_iterate_interface_neighbors(const struct interface *iface,
size_t alen = NLMSG_PAYLOAD(nhm, sizeof(*ndm));
while (RTA_OK(rta, alen)) {
- if (rta->rta_type == NDA_DST) {
- // TODO
- cb_neigh(NULL, iface, data);
+ if (rta->rta_type == NDA_DST &&
+ RTA_PAYLOAD(rta) == sizeof(struct in6_addr)) {
+ cb_neigh(RTA_DATA(rta), iface, data);
break;
} else {
rta = RTA_NEXT(rta, alen);