summaryrefslogtreecommitdiffstats
path: root/contrib/tcp_wrappers/update.c
diff options
context:
space:
mode:
authorshin <shin@FreeBSD.org>2000-02-03 10:27:03 +0000
committershin <shin@FreeBSD.org>2000-02-03 10:27:03 +0000
commit225d233deb08e4006d8cabd0a6572f76d729f90d (patch)
tree5e244ba219acd7cbeb17a0c5dc92b62227ab2828 /contrib/tcp_wrappers/update.c
parent22aa8f5f0343020efcf93d4ebc043c5f558995d5 (diff)
downloadFreeBSD-src-225d233deb08e4006d8cabd0a6572f76d729f90d.zip
FreeBSD-src-225d233deb08e4006d8cabd0a6572f76d729f90d.tar.gz
Missing tcp_wrapper IPv6 support seemed to be a bug, so commit it.
Now when tcp_wrapper is enabled by inetd -wW, several accesses which should be permitted are refused only for IPv6, if hostname is used to decide the host to be allowed. IPv6 users will be just upset. About security related concern. -All extensions are wrapped by #ifdef INET6, so people can completely disable the extension by recompile libwrap without INET6 option. -Access via IPv6 is not enabled by default. People need to enable IPv6 access by changing /etc/inetd.conf at first, by adding tcp6 and/or tcp46 entries. -The base of patches are from KAME package and are actually daily used for more than a year in several Japanese IPv6 environments. -Patches are reviewed by markm. Approved by: jkh Submitted by: Hajimu UMEMOTO <ume@mahoroba.org> Reviewed by: markm Obtained from: KAME project
Diffstat (limited to 'contrib/tcp_wrappers/update.c')
-rw-r--r--contrib/tcp_wrappers/update.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/tcp_wrappers/update.c b/contrib/tcp_wrappers/update.c
index a76cf2b..b612d5e 100644
--- a/contrib/tcp_wrappers/update.c
+++ b/contrib/tcp_wrappers/update.c
@@ -11,6 +11,8 @@
* Diagnostics are reported through syslog(3).
*
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
+ *
+ * $FreeBSD$
*/
#ifndef lint
@@ -46,10 +48,18 @@ va_list ap;
request->fd = va_arg(ap, int);
continue;
case RQ_CLIENT_SIN:
+#ifdef INET6
+ request->client->sin = va_arg(ap, struct sockaddr *);
+#else
request->client->sin = va_arg(ap, struct sockaddr_in *);
+#endif
continue;
case RQ_SERVER_SIN:
+#ifdef INET6
+ request->server->sin = va_arg(ap, struct sockaddr *);
+#else
request->server->sin = va_arg(ap, struct sockaddr_in *);
+#endif
continue;
/*
OpenPOWER on IntegriCloud