diff options
author | Steven Barth <steven@midlink.org> | 2013-04-19 15:36:19 +0200 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2013-04-19 15:36:19 +0200 |
commit | cbb2b3270ad59ca91a04aba94eee0c73e24ce80b (patch) | |
tree | 9f28a6c48b39f3b839e72faf3ee99c2160dc2167 | |
parent | b35fd5d5788184f685520352962f1a727ea91c1e (diff) |
IPv6: Try harder to assign prefix parts
-rw-r--r-- | interface-ip.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/interface-ip.c b/interface-ip.c index d18fa74..afdf67b 100644 --- a/interface-ip.c +++ b/interface-ip.c @@ -640,7 +640,13 @@ static void interface_update_prefix_assignments(struct device_prefix *prefix, bo while (!list_empty(&assign_later)) { c = list_first_entry(&assign_later, struct device_prefix_assignment, head); list_del(&c->head); - if (!interface_prefix_assign(&prefix->assignments, c)) { + + bool assigned = false; + do { + assigned = interface_prefix_assign(&prefix->assignments, c); + } while (!assigned && ++c->length <= 64); + + if (!assigned) { netifd_log_message(L_WARNING, "Failed to assign subprefix " "of size %hhu for %s\n", c->length, c->name); free(c); |