From 694ed35a9c572581333fb6060c3c8b7a36df5b4e Mon Sep 17 00:00:00 2001 From: sheldonh Date: Wed, 11 Jul 2001 11:04:01 +0000 Subject: Fix the IPv6 bind() call properly. The author didn't spot the flaw in my patch when I initially submitted it. This is his fully tested version. --- mail/exim/files/patch-src::daemon.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'mail/exim') diff --git a/mail/exim/files/patch-src::daemon.c b/mail/exim/files/patch-src::daemon.c index 1cfdf2b972ca..b792bbf3529c 100644 --- a/mail/exim/files/patch-src::daemon.c +++ b/mail/exim/files/patch-src::daemon.c @@ -1,12 +1,17 @@ --- src/daemon.c.orig Tue Jul 10 11:52:32 2001 +++ src/daemon.c Tue Jul 10 11:53:33 2001 -@@ -841,7 +841,8 @@ +@@ -841,7 +841,13 @@ for (i = 9; i >= 0; i--) { - if (bind(listen_sockets[sk], (struct sockaddr *)&sin, sizeof(sin)) < 0) + if (bind(listen_sockets[sk], (struct sockaddr *)&sin, -+ (ipv6_address) ? sizeof(sin.v6) : sizeof(sin.v4)) < 0) ++ #ifdef HAVE_IPV6 ++ ipv6_socket? sizeof(sin.v6) : sizeof(sin.v4) ++ #else ++ sizeof(sin) ++ #endif ++ ) < 0) { char *msg = strerror(errno); char *addr = (ipa->address[0] == 0)? "(any)" : ipa->address; -- cgit