Skip to content

Commit

Permalink
cifs: Don't match port on SMBDirect transport
Browse files Browse the repository at this point in the history
SMBDirect manages its own ports in the transport layer, there is no need to
check the port to find a connection.

Signed-off-by: Long Li <longli@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Ronnie sahlberg <lsahlber@redhat.com>
  • Loading branch information
Long Li authored and Steve French committed May 16, 2019
1 parent 7f46d23 commit 3b24911
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -2446,6 +2446,10 @@ match_port(struct TCP_Server_Info *server, struct sockaddr *addr)
{
__be16 port, *sport;

/* SMBDirect manages its own ports, don't match it here */
if (server->rdma)
return true;

switch (addr->sa_family) {
case AF_INET:
sport = &((struct sockaddr_in *) &server->dstaddr)->sin_port;
Expand Down

0 comments on commit 3b24911

Please sign in to comment.