about summary refs log tree commit diff
path: root/Src/Modules/tcp.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2002-04-25 14:06:47 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2002-04-25 14:06:47 +0000
commit421123b0f0fca3439ea84f850e07b6d452d8c04d (patch)
tree97021088f7a1d3eea187c98f0b3d148dcfedc0dc /Src/Modules/tcp.c
parentf630c8abf4844dfcb84a21ec558f3c28726312ca (diff)
downloadzsh-421123b0f0fca3439ea84f850e07b6d452d8c04d.tar.gz
zsh-421123b0f0fca3439ea84f850e07b6d452d8c04d.tar.xz
zsh-421123b0f0fca3439ea84f850e07b6d452d8c04d.zip
17040: Src/Modules/tcp.c: AF_INET6 wasn't copied into the
socket structure for IPv6.
17041: Src/Modules/zftp.c: Minor but fatal typos creating a data
connection for zftp using IPv6.
Diffstat (limited to 'Src/Modules/tcp.c')
-rw-r--r--Src/Modules/tcp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/Modules/tcp.c b/Src/Modules/tcp.c
index eb4685b39..5f5f432c6 100644
--- a/Src/Modules/tcp.c
+++ b/Src/Modules/tcp.c
@@ -322,13 +322,14 @@ tcp_connect(Tcp_session sess, char *addrp, struct hostent *zhost, int d_port)
 # ifdef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID
 	sess->peer.in6.sin6_scope_id = 0;
 # endif
+	sess->peer.in6.sin6_family = zhost->h_addrtype;
 	salen = sizeof(struct sockaddr_in6);
     } else
 #endif /* SUPPORT_IPV6 */
     {
 	memcpy(&(sess->peer.in.sin_addr), addrp, zhost->h_length);
 	sess->peer.in.sin_port = d_port;
-	sess->peer.a.sa_family = zhost->h_addrtype;
+	sess->peer.in.sin_family = zhost->h_addrtype;
 	salen = sizeof(struct sockaddr_in);
     }