diff options
author | Jun Kuriyama <kuriyama@FreeBSD.org> | 2003-04-23 23:20:28 +0000 |
---|---|---|
committer | Jun Kuriyama <kuriyama@FreeBSD.org> | 2003-04-23 23:20:28 +0000 |
commit | 8208087fc7edb68c1b6b5259fc82a7690a7520c2 (patch) | |
tree | 5313ded5f8620c5ca1d723a46c40e29c8fc928a0 /net/openldap20-server | |
parent | Update to version 0.5.1 (diff) |
IPv6 connection was always treated as "unknown" by tcp_wrapper.
This fixes by setting peeraddr correctly.
Latest CVS source seems to be fixed in another way, but it looks
that stores into auto variable in local scope which may cause a
problem...
Notes
Notes:
svn path=/head/; revision=79542
Diffstat (limited to 'net/openldap20-server')
-rw-r--r-- | net/openldap20-server/Makefile | 2 | ||||
-rw-r--r-- | net/openldap20-server/files/patch-daemon.c | 28 |
2 files changed, 29 insertions, 1 deletions
diff --git a/net/openldap20-server/Makefile b/net/openldap20-server/Makefile index 910690ec7d5c..0c3f2db1d01a 100644 --- a/net/openldap20-server/Makefile +++ b/net/openldap20-server/Makefile @@ -7,7 +7,7 @@ PORTNAME= openldap20 PORTVERSION= 2.0.25 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= net databases MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \ http://www.PlanetMirror.com/pub/openldap/%SUBDIR%/ \ diff --git a/net/openldap20-server/files/patch-daemon.c b/net/openldap20-server/files/patch-daemon.c new file mode 100644 index 000000000000..75fced252e07 --- /dev/null +++ b/net/openldap20-server/files/patch-daemon.c @@ -0,0 +1,28 @@ +--- servers/slapd/daemon.c.orig Thu Apr 24 07:51:08 2003 ++++ servers/slapd/daemon.c Thu Apr 24 07:52:05 2003 +@@ -863,6 +863,7 @@ + + char *dnsname = NULL; + char *peeraddr; ++ char peeraddr6[INET6_ADDRSTRLEN]; + #ifdef LDAP_PF_LOCAL + char peername[MAXPATHLEN + sizeof("PATH=")]; + #elif defined(LDAP_PF_INET6) +@@ -995,12 +996,12 @@ + peeraddr != NULL ? peeraddr : "unknown", + (unsigned) ntohs( from.sa_in6_addr.sin6_port ) ); + } else { +- char addr[INET6_ADDRSTRLEN]; +- sprintf( peername, "IP=%s %d", +- inet_ntop( AF_INET6, +- &from.sa_in6_addr.sin6_addr, +- addr, sizeof addr) ? addr : "unknown", ++ const char *addr = inet_ntop( AF_INET6, ++ &from.sa_in6_addr.sin6_addr, ++ peeraddr6, sizeof peeraddr6); ++ sprintf( peername, "IP=%s %d", addr ? addr : "unknown", + (unsigned) ntohs( from.sa_in6_addr.sin6_port ) ); ++ if (addr) peeraddr = addr; + } + break; + # endif /* LDAP_PF_INET6 */ |