projects
/
oweals
/
odhcpd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e778d6
)
Replace IN6_ARE_ADDR_EQUAL by memcmp to avoid unaligneds
author
Steven Barth
<steven@midlink.org>
Wed, 19 Feb 2014 12:34:10 +0000
(13:34 +0100)
committer
Steven Barth
<steven@midlink.org>
Wed, 19 Feb 2014 12:34:10 +0000
(13:34 +0100)
src/dhcpv6-ia.c
patch
|
blob
|
history
diff --git
a/src/dhcpv6-ia.c
b/src/dhcpv6-ia.c
index cca6664342f73e431fc0da54861097e5d9a59d9a..b1931ef5f55ba225fe344826f08edc55defa6b55 100644
(file)
--- 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;
}
}