From 2ce1c6dcec4afa1c7bd16e79cfcae247b88450ec Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Fri, 1 Feb 2013 12:38:16 +0100 Subject: [PATCH] Avoid redundant deduplication --- src/ra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ra.c b/src/ra.c index e32670e..b249288 100644 --- 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); -- 2.39.5