cifs: don't send down the destination address to sendmsg for a SOCK_STREAM
authorStefan Metzmacher <metze@samba.org>
Wed, 14 Sep 2022 03:25:46 +0000 (05:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Sep 2022 08:55:44 +0000 (10:55 +0200)
commit 17d3df38dc5f4cec9b0ac6eb79c1859b6e2693a4 upstream.

This is ignored anyway by the tcp layer.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Cc: stable@vger.kernel.org
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/transport.c

index de133eeebc8a4b3c041982f6eed4a7603c0e02e4..c821d13c6d7209b6c00366106154eb1e6792afd1 100644 (file)
@@ -140,8 +140,8 @@ smb_send_kvec(struct TCP_Server_Info *server, struct msghdr *smb_msg,
 
        *sent = 0;
 
-       smb_msg->msg_name = (struct sockaddr *) &server->dstaddr;
-       smb_msg->msg_namelen = sizeof(struct sockaddr);
+       smb_msg->msg_name = NULL;
+       smb_msg->msg_namelen = 0;
        smb_msg->msg_control = NULL;
        smb_msg->msg_controllen = 0;
        if (server->noblocksnd)