[Swan-commit] Changes to ref refs/heads/master
Andrew Cagney
cagney at vault.libreswan.fi
Mon Oct 23 15:12:29 UTC 2017
New commits:
commit f827bf6d6366a848cfa8b116b426d9a1580bd354
Merge: c6be1e5 c3d370e
Author: Andrew Cagney <cagney at gnu.org>
Date: Mon Oct 23 10:59:44 2017 -0400
pluto: when listing connections, sort by connection _then_ state
The code was quick-sorting a table ordered by hash and then hash-slot
(which might be new-to-old). Since the sort function only compared
connections the result wasn't stable.
The change modifies the compare function so that, When connections are
the same, states are compared. Consequently, within identical
connections, state order matches the state list).
Merge commit 'c3d370ed5a400dd6ca8bc3382849bec36d5ae616'
commit c3d370ed5a400dd6ca8bc3382849bec36d5ae616
Author: Andrew Cagney <cagney at gnu.org>
Date: Mon Oct 23 10:57:58 2017 -0400
testing: update results to expect better sorted list of connections
if the connection is the same it sorts by state
commit fffa9ad8696ba36ec73fe3367635d5ed5856fb67
Author: Andrew Cagney <cagney at gnu.org>
Date: Fri Oct 20 11:23:14 2017 -0400
state: make state->connection sort more stable
If the connections are identical, sort by state. Since the state
comparison eventually compares serial NRs, this orders related states
in assending order (parent->child).
The old code seemingly sorted things child->parent but this was mostly
luck:
- the table was very small with only related entries so already "sorted"
- for parent->child states (same hash) things were being ordered
child->parent
any larger data set would have unpredictable ordreing since qsort()
isn't considered stable.
More information about the Swan-commit
mailing list