[exim-dev] [Bug 2694] Wrong distribution to spamd-servers

Top Page
Delete this message
Reply to this message
Author: admin
Date:  
To: exim-dev
Subject: [exim-dev] [Bug 2694] Wrong distribution to spamd-servers
https://bugs.exim.org/show_bug.cgi?id=2694

--- Comment #6 from Git Commit <git@???> ---
Git commit:
https://git.exim.org/exim.git/commitdiff/83811e3c1b8189c0a725ec53df699730e7767263

commit 83811e3c1b8189c0a725ec53df699730e7767263
Author:     Heiko Schlichting <heiko@???>
AuthorDate: Fri Feb 19 11:14:36 2021 +0000
Commit:     Jeremy Harris <jgh146exb@???>
CommitDate: Fri Feb 19 11:53:16 2021 +0000


    Fix weight calculation for socks_proxy.  Bug 2694
---
 doc/doc-txt/ChangeLog           | 4 ++--
 src/src/transports/smtp_socks.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 59fb46a..2c17877 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -204,8 +204,8 @@ JH/42 Bug 2693: Harden against a peer which reneges on a
452 "too many
       would result in both lost and duplicate recipients for a message.


 JH/43 Bug 2694: Fix weighted distribution of work to multiple spamd servers.
-      Previously the weighting was incorrectly applied.  Found and fixed by
-      Heiko Schlichting.
+      Previously the weighting was incorrectly applied.  Similar fix for socks
+      proxies.  Found and fixed by Heiko Schlichting.



 Exim version 4.94
diff --git a/src/src/transports/smtp_socks.c b/src/src/transports/smtp_socks.c
index 41dc781..cd8ed3e 100644
--- a/src/src/transports/smtp_socks.c
+++ b/src/src/transports/smtp_socks.c
@@ -190,7 +190,7 @@ for (rnd = random() % weights, i = 0; i < nproxies; i++)
   {
   sd = &proxies[i];
   if (!sd->is_failed && sd->priority == pri)
-    if ((rnd -= sd->weight) <= 0)
+    if ((rnd -= sd->weight) < 0)
       return i;
   }


--
You are receiving this mail because:
You are on the CC list for the bug.