]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Feature] Improve address rotation algorithm 5249/head
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 7 Dec 2024 15:43:55 +0000 (15:43 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 7 Dec 2024 15:43:55 +0000 (15:43 +0000)
commit5d6581cfe0647f2ac9d3bbf170ee6ef5ff6cf39e
tree80b00c901521d8b3a95822ffa338c6573d76483a
parentd2a8b3d26c71554e3dda7d7b8f4fe1344587d40a
[Feature] Improve address rotation algorithm

We apply the following algorithm:
1) Get the current element and it's AF
2) If the next element has the same AF, then we just move to the next element
3) If the next element has different AF, then we should find the next element with the same AF
4) If we cannot find such element, then we return the next element (switching AF)
src/libutil/upstream.c