dhcpv6-ia: fix delete logic of an assignment in reconf_timer
authorHans Dedecker <dedeckeh@gmail.com>
Fri, 30 Dec 2016 16:44:44 +0000 (17:44 +0100)
committerHans Dedecker <dedeckeh@gmail.com>
Fri, 30 Dec 2016 16:50:14 +0000 (17:50 +0100)
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>
src/dhcpv6-ia.c

index e1d0278e013c56a03e9d7ae2bd2d73ef0e92edff..17294f09fe580d05c3fd74377bbb508e9bd629d3 100644 (file)
@@ -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;