[exim-dev] [Bug 2656] proxy protocol support doesn't work in…

Página Inicial
Delete this message
Reply to this message
Autor: admin
Data:  
Para: exim-dev
Assunto: [exim-dev] [Bug 2656] proxy protocol support doesn't work in -bh (host_checking) mode
https://bugs.exim.org/show_bug.cgi?id=2656

Git Commit <git@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |git@???


--- Comment #4 from Git Commit <git@???> ---
Git commit:
https://git.exim.org/exim.git/commitdiff/f5107e39b94bd7d304dbe3ec766b5eecd647fe00

commit f5107e39b94bd7d304dbe3ec766b5eecd647fe00
Author:     Heiko Schlittermann (HS12-RIPE) <hs@???>
AuthorDate: Fri Oct 2 08:17:39 2020 +0200
Commit:     Heiko Schlittermann (HS12-RIPE) <hs@???>
CommitDate: Sun Oct 4 11:23:35 2020 +0200


    Replace recv() by read() (Bug 2656)
---
 src/src/smtp_in.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index c0b6b2a..3941667 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -1128,7 +1128,7 @@ if (cr != NULL)

 while (capacity > 0)
   {
-  do { ret = recv(fd, to, 1, 0); } while (ret == -1 && errno == EINTR);
+  do { ret = read(fd, to, 1); } while (ret == -1 && errno == EINTR);
   if (ret == -1)
     return -1;
   have++;
@@ -1253,7 +1253,7 @@ do
   don't do a PEEK into the data, actually slurp up enough to be
   "safe". Can't take it all because TLS-on-connect clients follow
   immediately with TLS handshake. */
-  ret = recv(fd, &hdr, PROXY_INITIAL_READ, 0);
+  ret = read(fd, &hdr, PROXY_INITIAL_READ);
   }
   while (ret == -1 && errno == EINTR);


@@ -1269,7 +1269,7 @@ if ((ret == PROXY_INITIAL_READ) && (memcmp(&hdr.v2,
v2sig, sizeof(v2sig)) == 0))
   /* First get the length fields. */
   do
     {
-    retmore = recv(fd, (uschar*)&hdr + ret, PROXY_V2_HEADER_SIZE -
PROXY_INITIAL_READ, 0);
+    retmore = read(fd, (uschar*)&hdr + ret, PROXY_V2_HEADER_SIZE -
PROXY_INITIAL_READ);
     } while (retmore == -1 && errno == EINTR);
   if (retmore == -1)
     goto proxyfail;
@@ -1306,7 +1306,7 @@ if ((ret == PROXY_INITIAL_READ) && (memcmp(&hdr.v2,
v2sig, sizeof(v2sig)) == 0))
     {
     do
       {
-      retmore = recv(fd, (uschar*)&hdr + ret, size-ret, 0);
+      retmore = read(fd, (uschar*)&hdr + ret, size-ret);
       } while (retmore == -1 && errno == EINTR);
     if (retmore == -1)
       goto proxyfail;


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