Commit 0442d14a authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

More tweaks to compare_buffered_updates.

parent 8192eca2
......@@ -749,7 +749,7 @@ static int
compare_buffered_updates(const void *av, const void *bv)
{
const struct buffered_update *a = av, *b = bv;
int rc, v4a, v4b;
int rc, v4a, v4b, ipa, ipb;
rc = memcmp(a->id, b->id, 16);
if(rc != 0)
......@@ -763,6 +763,14 @@ compare_buffered_updates(const void *av, const void *bv)
else if(v4a < v4b)
return -1;
ipa = in_prefix(a->id, a->prefix, a->plen);
ipb = in_prefix(b->id, b->prefix, b->plen);
if(ipa > ipb)
return -1;
else if(ipa < ipb)
return 1;
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment