cifs: Don't match port on SMBDirect transport
authorLong Li <longli@microsoft.com>
Wed, 15 May 2019 21:09:04 +0000 (14:09 -0700)
committerSteve French <stfrench@microsoft.com>
Thu, 16 May 2019 03:27:45 +0000 (22:27 -0500)
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>
fs/cifs/connect.c

index 0b3ac8b76d18865d20073322fb31c70320ee16f1..8c4121da624e153fd91935b3f698c84bc1e9e889 100644 (file)
@@ -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;