diff options
author | sheldonh <sheldonh@FreeBSD.org> | 2001-07-11 19:04:01 +0800 |
---|---|---|
committer | sheldonh <sheldonh@FreeBSD.org> | 2001-07-11 19:04:01 +0800 |
commit | 694ed35a9c572581333fb6060c3c8b7a36df5b4e (patch) | |
tree | dff32b934a5e14efa1561c8b439ca4cf06ada215 /mail/exim-devel | |
parent | d0ec93f30abd60b46c9902bfe5d829b791d5320e (diff) | |
download | freebsd-ports-gnome-694ed35a9c572581333fb6060c3c8b7a36df5b4e.tar.gz freebsd-ports-gnome-694ed35a9c572581333fb6060c3c8b7a36df5b4e.tar.zst freebsd-ports-gnome-694ed35a9c572581333fb6060c3c8b7a36df5b4e.zip |
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.
Diffstat (limited to 'mail/exim-devel')
-rw-r--r-- | mail/exim-devel/files/patch-src::daemon.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mail/exim-devel/files/patch-src::daemon.c b/mail/exim-devel/files/patch-src::daemon.c index 1cfdf2b972ca..b792bbf3529c 100644 --- a/mail/exim-devel/files/patch-src::daemon.c +++ b/mail/exim-devel/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; |