projects
/
oweals
/
odhcp6c.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18c1cff
)
Avoid redundant deduplication
author
Steven Barth
<steven@midlink.org>
Fri, 1 Feb 2013 11:38:16 +0000
(12:38 +0100)
committer
Steven Barth
<steven@midlink.org>
Fri, 1 Feb 2013 11:38:16 +0000
(12:38 +0100)
src/ra.c
patch
|
blob
|
history
diff --git
a/src/ra.c
b/src/ra.c
index e32670ecbba0124b8629d6205df36fb07149ea93..b249288279955446ecf59e061a4015b0314b3302 100644
(file)
--- a/
src/ra.c
+++ b/
src/ra.c
@@
-125,7
+125,7
@@
static bool ra_deduplicate(const struct in6_addr *any, uint8_t length)
{
struct odhcp6c_entry entry = {IN6ADDR_ANY_INIT, length, 0, *any, 0, 0};
struct odhcp6c_entry *x = odhcp6c_find_entry(STATE_RA_PREFIX, &entry);
- if (x) {
+ if (x
&& IN6_ARE_ADDR_EQUAL(&x->target, any)
) {
odhcp6c_random(&x->target.s6_addr32[2], 2 * sizeof(uint32_t));
} else if (odhcp6c_find_entry(STATE_IA_NA, &entry)) {
dhcpv6_request(DHCPV6_MSG_DECLINE);