diff options
author | kuriyama <kuriyama@FreeBSD.org> | 2003-04-23 23:20:28 +0000 |
---|---|---|
committer | kuriyama <kuriyama@FreeBSD.org> | 2003-04-23 23:20:28 +0000 |
commit | 5a3e8bf1908f3bd7d9c04e32a96760f09c8b01ea (patch) | |
tree | 280e2866949a6cb5f9516209903e0ac4a8123c96 /net | |
parent | 5243e9f8a768826f11fb97d33f2e4869dd1dbab5 (diff) | |
download | FreeBSD-ports-5a3e8bf1908f3bd7d9c04e32a96760f09c8b01ea.zip FreeBSD-ports-5a3e8bf1908f3bd7d9c04e32a96760f09c8b01ea.tar.gz |
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...
Diffstat (limited to 'net')
-rw-r--r-- | net/openldap20-server/Makefile | 2 | ||||
-rw-r--r-- | net/openldap20-server/files/patch-daemon.c | 28 | ||||
-rw-r--r-- | net/openldap20/Makefile | 2 | ||||
-rw-r--r-- | net/openldap20/files/patch-daemon.c | 28 |
4 files changed, 58 insertions, 2 deletions
diff --git a/net/openldap20-server/Makefile b/net/openldap20-server/Makefile index 910690e..0c3f2db 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 0000000..75fced2 --- /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 */ diff --git a/net/openldap20/Makefile b/net/openldap20/Makefile index 910690e..0c3f2db 100644 --- a/net/openldap20/Makefile +++ b/net/openldap20/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/files/patch-daemon.c b/net/openldap20/files/patch-daemon.c new file mode 100644 index 0000000..75fced2 --- /dev/null +++ b/net/openldap20/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 */ |