[freeipa PR#2041][opened] [Backport][ipa-4-5] Sort and shuffle SRV record by priority and weight
by tiran
URL: https://github.com/freeipa/freeipa/pull/2041
Author: tiran
Title: #2041: [Backport][ipa-4-5] Sort and shuffle SRV record by priority and weight
Action: opened
PR body:
"""
On multiple occasions, SRV query answers were not properly sorted by
priority. Records with same priority weren't randomized and shuffled.
This caused FreeIPA to contact the same remote peer instead of
distributing the load across all available servers.
Two new helper functions now take care of SRV queries. sort_prio_weight()
sorts SRV and URI records. query_srv() combines SRV lookup with
sort_prio_weight().
PR was ACKed manually because this is backport of PR #2032.
Fixes: https://pagure.io/freeipa/issue/7475
Signed-off-by: Christian Heimes <cheimes(a)redhat.com>
Reviewed-By: Rob Crittenden <rcritten(a)redhat.com>
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/2041/head:pr2041
git checkout pr2041
5 years, 10 months