When an IPv6 address change is triggered each PD assignment is checked
if it is still consistent with the updated IPv6 prefix list.
If not consistent anymore a reconfigure is triggered for the assignment
and a best effort is made to assign a new IA_PD prefix.
If it not possible anymore to assign an IA_PD prefix delete the PD
assignment now so it will result into a NO BINDING status code for the
given IA_PD in the DHCPv6 reply when the client tries to renew the IA_PD prefix.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
while (!list_empty(&reassign)) {
c = list_first_entry(&reassign, struct dhcp_assignment, head);
list_del_init(&c->head);
- if (!assign_pd(iface, c)) {
- c->assigned = 0;
- list_add(&c->head, &iface->ia_assignments);
- }
+ if (!assign_pd(iface, c))
+ free_assignment(c);
}
dhcpv6_ia_write_statefile();