diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-08 17:46:40 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-08 17:46:40 +0000 |
commit | c02fc6a9ea847c059de4fb5772106541cebe6845 (patch) | |
tree | 5f6b26274deac72fd8d5cbc63711a03fc5ea725c /src | |
parent | 234923a5ff0e7ddef989cc4172d3790cc8b7dd12 (diff) | |
download | rspamd-c02fc6a9ea847c059de4fb5772106541cebe6845.tar.gz rspamd-c02fc6a9ea847c059de4fb5772106541cebe6845.zip |
[Minor] Except the current upstream when doing final DNS retransmit
Diffstat (limited to 'src')
-rw-r--r-- | src/libserver/dns.c | 8 |
1 files changed, 7 insertions, 1 deletions
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)); |