Update stunnel to 4.07, which incorporates most of our fixes to 4.06

and also fixes a crash if a client connection is closed too early.

Approved by:	portmgr (krion)
This commit is contained in:
Peter Pentchev 2005-01-03 09:54:20 +00:00
parent ef94f48a8b
commit 3decfd3c3c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=125694
3 changed files with 9 additions and 34 deletions

View File

@ -6,8 +6,7 @@
#
PORTNAME= stunnel
PORTVERSION= 4.06
PORTREVISION= 2
PORTVERSION= 4.07
CATEGORIES= security
MASTER_SITES= http://www.stunnel.org/download/stunnel/src/ \
ftp://stunnel.mirt.net/stunnel/OBSOLETE/ \

View File

@ -1,2 +1,2 @@
MD5 (stunnel-4.06.tar.gz) = bac37fe3ecb61a0481188694e0823220
SIZE (stunnel-4.06.tar.gz) = 484200
MD5 (stunnel-4.07.tar.gz) = 7d53af550a1c2e01e146b936e58b8860
SIZE (stunnel-4.07.tar.gz) = 486230

View File

@ -1,40 +1,16 @@
--- src/network.c.orig Thu Oct 14 18:03:49 2004
+++ src/network.c Thu Dec 30 16:12:16 2004
@@ -125,7 +125,7 @@
int retval;
--- src/network.c.orig Mon Jan 3 09:16:45 2005
+++ src/network.c Mon Jan 3 09:17:49 2005
@@ -488,10 +488,13 @@
do { /* skip "Interrupted system call" errors */
- retval=poll(fds->ufds, fds->nfds, 1000*timeout);
+ retval=poll(fds->ufds, fds->nfds, timeout < 0? INFTIM: 1000*timeout);
/* no timeout -> main loop */
if(timeout<0 && retval>0 && s_poll_canread(fds, signal_pipe[0]))
signal_pipe_empty();
@@ -416,8 +416,12 @@
return "Temporary failure in name resolution (EAI_AGAIN)";
case EAI_FAIL:
return "Non-recoverable failure in name resolution (EAI_FAIL)";
+#ifdef EAI_NODATA
+#if EAI_NODATA != EAI_NONAME
case EAI_NODATA:
return "No address associated with nodename (EAI_NODATA)";
+#endif
+#endif
case EAI_FAMILY:
return "ai_family not supported (EAI_FAMILY)";
case EAI_SOCKTYPE:
@@ -561,11 +565,14 @@
/* getnameinfo() version */
char *s_ntop(char *text, SOCKADDR_UNION *addr) {
- char host[20], port[6];
+ char host[IPLEN], port[6];
char host[IPLEN-6], port[6];
+ int err;
- if(getnameinfo(&addr->sa, addr_len(*addr),
- host, 20, port, 6, NI_NUMERICHOST|NI_NUMERICSERV)) {
- host, IPLEN-6, port, 6, NI_NUMERICHOST|NI_NUMERICSERV)) {
- sockerror("getnameinfo");
+ err = getnameinfo(&addr->sa, addr_len(*addr),
+ host, IPLEN, port, 6, NI_NUMERICHOST|NI_NUMERICSERV);
+ host, IPLEN-6, port, 6, NI_NUMERICHOST|NI_NUMERICSERV);
+ if (err) {
+ s_log(LOG_ERR, "Error resolving the specified address: %s",
+ s_gai_strerror(err));