return true;
}
- if (c->assigned != 0)
- current = (c->assigned + (1 << (64 - c->length)));
+ current = (c->assigned + (1 << (64 - c->length)));
}
}
continue;
current = (current + asize) & (~asize);
+
if (current + asize < c->assigned) {
assign->assigned = current;
list_add_tail(&assign->head, &c->head);
return true;
}
- if (c->assigned != 0)
- current = (c->assigned + (1 << (64 - c->length)));
+ current = (c->assigned + (1 << (64 - c->length)));
}
return false;
c->managed_size)
continue;
- if (c->assigned == 0 || c->assigned >= border->assigned)
+ if (c->assigned >= border->assigned)
list_move(&c->head, &reassign);
else if (c->flags & OAF_BOUND)
apply_lease(c, true);
o_ia_p.addr.s6_addr32[1] |= htonl(a->assigned);
o_ia_p.addr.s6_addr32[2] = o_ia_p.addr.s6_addr32[3] = 0;
- if ((a->assigned == 0 && a->managed_size == 0) ||
- !valid_prefix_length(a, addrs[i].prefix))
+ if (!valid_prefix_length(a, addrs[i].prefix))
continue;
if (buflen < ia_len + sizeof(o_ia_p))
o_ia_a.addr.s6_addr32[3] = htonl(a->assigned);
- if (!ADDR_ENTRY_VALID_IA_ADDR(iface, i, m, addrs) ||
- a->assigned == 0)
+ if (!ADDR_ENTRY_VALID_IA_ADDR(iface, i, m, addrs))
continue;
if (buflen < ia_len + sizeof(o_ia_a))