On Sat, 02 Nov 2024 18:00:37 +0100,
Stuart Henderson <[email protected]> wrote:
> 
> to save digging around in archives, can you send a current diff please?
> 

sure, here it is

Index: mail/dovecot/Makefile
===================================================================
RCS file: /home/cvs/ports/mail/dovecot/Makefile,v
diff -u -p -r1.319 Makefile
--- mail/dovecot/Makefile       5 Oct 2024 07:35:54 -0000       1.319
+++ mail/dovecot/Makefile       13 Oct 2024 09:15:25 -0000
@@ -11,7 +11,7 @@ COMMENT-postgresql= PostgreSQL authentic
 V_MAJOR=       2.3
 V_DOVECOT=     2.3.21.1
 EPOCH=         0
-REVISION=      0
+REVISION=      1
 
 DISTNAME=      dovecot-${V_DOVECOT}
 PKGNAME=       dovecot-${V_DOVECOT}
Index: mail/dovecot/patches/patch-src_lib_net_c
===================================================================
RCS file: mail/dovecot/patches/patch-src_lib_net_c
diff -N mail/dovecot/patches/patch-src_lib_net_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ mail/dovecot/patches/patch-src_lib_net_c    20 Oct 2024 08:15:01 -0000
@@ -0,0 +1,20 @@
+net: OpenBSD should behave like FreeBSD on net_connect_ip_full
+
+This patch fixes errors such as
+ 
+      Fatal: connect(...) failed: Address already in use
+ 
+The fix is simple, extending FreeBSD's condition to OpenBSD as well,
+which results in such errors disappearing on the tested setup.
+Index: src/lib/net.c
+--- src/lib/net.c.orig
++++ src/lib/net.c
+@@ -213,7 +213,7 @@ static int net_connect_ip_full(const struct ip_addr *i
+               fd = net_connect_ip_once(ip, port, my_ip, sock_type, blocking);
+               if (fd != -1 || try++ >= MAX_CONNECT_RETRIES ||
+                   (errno != EADDRNOTAVAIL
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__OpenBSD__)
+                    /* busy */
+                    && errno != EADDRINUSE
+                    /* pf may cause this if another connection used

-- 
wbr, Kirill

Reply via email to