diff options
author | Steven Barth <steven@midlink.org> | 2013-02-01 12:38:16 +0100 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2013-02-01 12:38:16 +0100 |
commit | 2ce1c6dcec4afa1c7bd16e79cfcae247b88450ec (patch) | |
tree | ca4818bbf06bcd396a8e0492982fe37d60703fa2 | |
parent | 18c1cff36bd3b36b80321282fa7086d8752b63cc (diff) | |
download | odhcp6c-2ce1c6dcec4afa1c7bd16e79cfcae247b88450ec.tar.gz |
Avoid redundant deduplication
-rw-r--r-- | src/ra.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |