FreeBSD Bugzilla – Attachment 112197 Details for
Bug 153568
[patch] security/stunnel: enables transparent configuration option through application of IP_BINDANY
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.60 KB, created by
Jason Helfman
on 2010-12-30 23:30:09 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Jason Helfman
Created:
2010-12-30 23:30:09 UTC
Size:
1.60 KB
patch
obsolete
>--- security/stunnel/Makefile.orig 2010-12-30 12:15:43.000000000 -0800 >+++ security/stunnel/Makefile 2010-12-30 12:15:54.000000000 -0800 >@@ -7,7 +7,7 @@ > > PORTNAME= stunnel > PORTVERSION= 4.34 >-PORTREVISION= 1 >+PORTREVISION= 2 > CATEGORIES= security > MASTER_SITES= http://www.stunnel.org/download/stunnel/src/ \ > http://mirrors.zerg.biz/stunnel/%SUBDIR%/ \ >@@ -95,6 +95,10 @@ > ${WRKSRC}/tools/Makefile.in > .endif > >+.if ${OSVERSION} >= 800000 >+ @cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/bindany_client.c >+.endif >+ > post-install: > @${SETENV} PKG_PREFIX=${PREFIX} ${SH} \ > ${PKGINSTALL} ${PKGNAME} POST-INSTALL >--- /dev/null 2010-12-30 12:17:09.000000000 -0800 >+++ security/stunnel/files/bindany_client.c 2010-12-30 12:14:04.000000000 -0800 >@@ -0,0 +1,22 @@ >+--- ./src/client.c.orig 2010-12-30 09:53:09.000000000 -0800 >++++ ./src/client.c 2010-12-30 09:54:32.000000000 -0800 >+@@ -1034,15 +1034,15 @@ >+ static void local_bind(CLI *c) { >+ SOCKADDR_UNION addr; >+ >+-#ifdef IP_TRANSPARENT >++#ifdef IP_BINDANY >+ int on=1; >+ if(c->opt->option.transparent) { >+- if(setsockopt(c->fd, SOL_IP, IP_TRANSPARENT, &on, sizeof on)) >+- sockerror("setsockopt IP_TRANSPARENT"); >++ if(setsockopt(c->fd, IPPROTO_IP, IP_BINDANY, &on, sizeof on)) >++ sockerror("setsockopt IP_BINDANY"); >+ /* ignore the error to retain Linux 2.2 compatibility */ >+ /* the error will be handled by bind(), anyway */ >+ } >+-#endif /* IP_TRANSPARENT */ >++#endif /* IP_BINDANY */ >+ >+ memcpy(&addr, &c->bind_addr.addr[0], sizeof addr); >+ if(ntohs(addr.in.sin_port)>=1024) { /* security check */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 153568
: 112197