projects
/
project
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d095bf2
)
IPv6: Satisfy unhinted assignments ordered by prefix length
author
Steven Barth
<steven@midlink.org>
Mon, 17 Jun 2013 21:15:02 +0000
(23:15 +0200)
committer
Steven Barth
<steven@midlink.org>
Mon, 17 Jun 2013 21:15:02 +0000
(23:15 +0200)
interface-ip.c
patch
|
blob
|
history
diff --git
a/interface-ip.c
b/interface-ip.c
index 44dd63dd928c031d1304feb1775d7f17eeaf5faf..3b6be6b6aa803412bd48ac68d18c1e032279cf54 100644
(file)
--- a/
interface-ip.c
+++ b/
interface-ip.c
@@
-729,7
+729,16
@@
static void interface_update_prefix_assignments(struct device_prefix *prefix, bo
netifd_log_message(L_WARNING, "Failed to assign requested subprefix "
"of size %hhu for %s, trying other\n", c->length, c->name);
}
- list_add_tail(&c->head, &assign_later);
+
+ struct list_head *next = &assign_later;
+ struct device_prefix_assignment *n;
+ list_for_each_entry(n, &assign_later, head) {
+ if (n->length > c->length) {
+ next = &n->head;
+ break;
+ }
+ }
+ list_add_tail(&c->head, next);
}
if (c->assigned != -1)