summaryrefslogtreecommitdiff
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorSimo Leone <simo@archlinux.org>2009-06-25 06:44:43 +0400
committerSteve French <sfrench@us.ibm.com>2009-06-25 06:44:43 +0400
commit6debdbc0ba6253ac519cd5a3d22e30f1f9f1dd12 (patch)
tree523ef732a835d25a30d997bbff6fcf8321360857 /fs/cifs/connect.c
parent6459340cfcc6f6d165b27c3dd955aeb55a1b73d3 (diff)
downloadlinux-6debdbc0ba6253ac519cd5a3d22e30f1f9f1dd12.tar.xz
[CIFS] Copy struct *after* setting the port, instead of before.
Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Simo Leone <simo@archlinux.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index a581cfa2ba82..12c2cf693555 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1496,14 +1496,14 @@ cifs_get_tcp_session(struct smb_vol *volume_info)
cFYI(1, ("attempting ipv6 connect"));
/* BB should we allow ipv6 on port 139? */
/* other OS never observed in Wild doing 139 with v6 */
+ sin_server6->sin6_port = htons(volume_info->port);
memcpy(&tcp_ses->addr.sockAddr6, sin_server6,
sizeof(struct sockaddr_in6));
- sin_server6->sin6_port = htons(volume_info->port);
rc = ipv6_connect(tcp_ses);
} else {
+ sin_server->sin_port = htons(volume_info->port);
memcpy(&tcp_ses->addr.sockAddr, sin_server,
sizeof(struct sockaddr_in));
- sin_server->sin_port = htons(volume_info->port);
rc = ipv4_connect(tcp_ses);
}
if (rc < 0) {