]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] Fix rspamd nameserver round-robin when using /etc/resolv.conf 5721/head
authorCursor Agent <cursoragent@cursor.com>
Sat, 1 Nov 2025 12:56:18 +0000 (12:56 +0000)
committerCursor Agent <cursoragent@cursor.com>
Sat, 1 Nov 2025 12:56:18 +0000 (12:56 +0000)
commit1d8b1be135ed6e1dbae0f9bfe176d08664610ba9
tree65c05fcf9dcaf57fa92f1f4cd6b749e45c9e1f76
parent57fb33ebfb502a4744873dbcd0e820408b68122f
[Fix] Fix rspamd nameserver round-robin when using /etc/resolv.conf

When nameservers are parsed from /etc/resolv.conf, rspamd was setting
the upstream rotation strategy to RSPAMD_UPSTREAM_MASTER_SLAVE, which
caused it to only use the first nameserver unless it failed.

This behavior was inconsistent with the documented round-robin strategy
and with the behavior when nameservers are explicitly configured via
the configuration file.

Fixed by changing the rotation strategy to RSPAMD_UPSTREAM_ROUND_ROBIN
when parsing /etc/resolv.conf, matching the expected behavior.

Fixes RSP-284
src/libserver/dns.c