commit c02fc6a: [Minor] Except the current upstream when doing final DNS retransmit
Vsevolod Stakhov
vsevolod at highsecure.ru
Fri Nov 8 17:49:09 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-11-08 17:46:40 +0000
URL: https://github.com/rspamd/rspamd/commit/c02fc6a9ea847c059de4fb5772106541cebe6845 (HEAD -> master)
[Minor] Except the current upstream when doing final DNS retransmit
---
src/libserver/dns.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/libserver/dns.c b/src/libserver/dns.c
index f5b35eab7..71b8adf9f 100644
--- a/src/libserver/dns.c
+++ b/src/libserver/dns.c
@@ -824,7 +824,13 @@ rspamd_dns_select_upstream_retransmit (
struct upstream_list *ups = ups_data;
struct upstream *up;
- up = rspamd_upstream_get_forced (ups, RSPAMD_UPSTREAM_RANDOM, name, len);
+ if (prev_elt) {
+ up = rspamd_upstream_get_except (ups, (struct upstream *)prev_elt->lib_data,
+ RSPAMD_UPSTREAM_MASTER_SLAVE, name, len);
+ }
+ else {
+ up = rspamd_upstream_get_forced (ups, RSPAMD_UPSTREAM_RANDOM, name, len);
+ }
if (up) {
msg_debug ("select forced %s", rspamd_upstream_name (up));
More information about the Commits
mailing list