diff options
author | Steven Barth <steven@midlink.org> | 2014-02-19 13:34:10 +0100 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2014-02-19 13:34:10 +0100 |
commit | 4b6fb015e3124ad1fbb266f70b5aea5c4d6cbc87 (patch) | |
tree | 54613072a9d53828b88688f8bc4c5808e94399b3 /src | |
parent | 7e778d60e28a802f4d9a4c2d68ee97a5079a8946 (diff) |
Replace IN6_ARE_ADDR_EQUAL by memcmp to avoid unaligneds
Diffstat (limited to 'src')
-rw-r--r-- | src/dhcpv6-ia.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c index cca6664..b1931ef 100644 --- a/src/dhcpv6-ia.c +++ b/src/dhcpv6-ia.c @@ -719,13 +719,13 @@ static size_t append_reply(uint8_t *buf, size_t buflen, uint16_t status, if (ia->type == htons(DHCPV6_OPT_IA_PD)) { addr.s6_addr32[1] |= htonl(a->assigned); - if (IN6_ARE_ADDR_EQUAL(&p->addr, &addr) && + if (!memcmp(&p->addr, &addr, sizeof(addr)) && p->prefix == a->length) found = true; } else { addr.s6_addr32[3] = htonl(a->assigned); - if (IN6_ARE_ADDR_EQUAL(&n->addr, &addr)) + if (!memcmp(&n->addr, &addr, sizeof(addr))) found = true; } } |