summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2016-12-30 17:44:44 +0100
committerHans Dedecker <dedeckeh@gmail.com>2016-12-30 17:50:14 +0100
commit13937ab37916cd983cf89ab215cd9f7221633d8c (patch)
tree7faf8ddb21e7d2cfaa4d963011174a2092f846bb
parent60c396937959aff9b5358e7a5ab788f0f5f30ed4 (diff)
dhcpv6-ia: fix delete logic of an assignment in reconf_timer
Function free_dhcpv6_assignment already removes the assignment in the list so there's no need to call list_del in reconf_timer Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
-rw-r--r--src/dhcpv6-ia.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c
index e1d0278..17294f0 100644
--- a/src/dhcpv6-ia.c
+++ b/src/dhcpv6-ia.c
@@ -640,10 +640,9 @@ static void reconf_timer(struct uloop_timeout *event)
list_for_each_entry_safe(a, n, &iface->ia_assignments, head) {
if (!INFINITE_VALID(a->valid_until) && a->valid_until < now) {
if ((a->length < 128 && a->clid_len > 0) ||
- (a->length == 128 && a->clid_len == 0)) {
- list_del(&a->head);
+ (a->length == 128 && a->clid_len == 0))
free_dhcpv6_assignment(a);
- }
+
} else if (a->reconf_cnt > 0 && a->reconf_cnt < 8 &&
now > a->reconf_sent + (1 << a->reconf_cnt)) {
++a->reconf_cnt;