summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-05-03 19:05:32 +1000
committerDarren Tucker <dtucker@zip.com.au>2005-05-03 19:05:32 +1000
commit5b115d4401453a99313996dc48e6b8f3e54c5b54 (patch)
treec2acae7fd2d19746244a58236546747253052044
parent149da8577e5d494d17e1bd0235b24f4d9f2de49c (diff)
- (dtucker) [canohost.c] normalise socket addresses returned by
get_remote_hostname(). This means that IPv4 addresses in log messages on IPv6 enabled machines will no longer be prefixed by "::ffff:" and AllowUsers, DenyUsers, AllowGroups, DenyGroups will match IPv4-style addresses only for 4-in-6 mapped connections, regardless of whether or not the machine is IPv6 enabled. ok djm@
-rw-r--r--ChangeLog10
-rw-r--r--canohost.c2
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 16f33b77a..bcbc5f642 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
120050503
2 - (dtucker) [canohost.c] normalise socket addresses returned by
3 get_remote_hostname(). This means that IPv4 addresses in log messages
4 on IPv6 enabled machines will no longer be prefixed by "::ffff:" and
5 AllowUsers, DenyUsers, AllowGroups, DenyGroups will match IPv4-style
6 addresses only for 4-in-6 mapped connections, regardless of whether
7 or not the machine is IPv6 enabled. ok djm@
8
120050425 920050425
2 - (dtucker) [regress/multiplex.sh] Use "kill -0 $pid" to check for the 10 - (dtucker) [regress/multiplex.sh] Use "kill -0 $pid" to check for the
3 existence of a process since it's more portable. Found by jbasney at 11 existence of a process since it's more portable. Found by jbasney at
@@ -2462,4 +2470,4 @@
2462 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 2470 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
2463 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 2471 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
2464 2472
2465$Id: ChangeLog,v 1.3751 2005/04/25 07:03:29 dtucker Exp $ 2473$Id: ChangeLog,v 1.3752 2005/05/03 09:05:32 dtucker Exp $
diff --git a/canohost.c b/canohost.c
index 1c22d4770..94d666432 100644
--- a/canohost.c
+++ b/canohost.c
@@ -251,6 +251,8 @@ get_socket_address(int sock, int remote, int flags)
251 if (addr.ss_family == AF_INET6) 251 if (addr.ss_family == AF_INET6)
252 addrlen = sizeof(struct sockaddr_in6); 252 addrlen = sizeof(struct sockaddr_in6);
253 253
254 ipv64_normalise_mapped(&addr, &addrlen);
255
254 /* Get the address in ascii. */ 256 /* Get the address in ascii. */
255 if ((r = getnameinfo((struct sockaddr *)&addr, addrlen, ntop, 257 if ((r = getnameinfo((struct sockaddr *)&addr, addrlen, ntop,
256 sizeof(ntop), NULL, 0, flags)) != 0) { 258 sizeof(ntop), NULL, 0, flags)) != 0) {