]> Git Repo - linux.git/commitdiff
IB/srpt: Fix ACL lookup during login
authorBart Van Assche <[email protected]>
Wed, 3 Jan 2018 21:39:16 +0000 (13:39 -0800)
committerJason Gunthorpe <[email protected]>
Thu, 4 Jan 2018 03:07:51 +0000 (20:07 -0700)
Make sure that the initiator port GUID is stored in ch->ini_guid.
Note: when initiating a connection sgid and dgid members in struct
sa_path_rec represent the source and destination GIDs. When accepting
a connection however sgid represents the destination GID and dgid the
source GID.

Fixes: commit 2bce1a6d2209 ("IB/srpt: Accept GUIDs as port names")
Signed-off-by: Bart Van Assche <[email protected]>
Cc: <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
drivers/infiniband/ulp/srpt/ib_srpt.c

index 7c4249038004a34067f1fe01af0833a9c2862ccb..bfa576aa9f03c75727b9b61db67d47bfc8846797 100644 (file)
@@ -2077,7 +2077,7 @@ static int srpt_cm_req_recv(struct ib_cm_id *cm_id,
                goto destroy_ib;
        }
 
-       guid = (__be16 *)&param->primary_path->sgid.global.interface_id;
+       guid = (__be16 *)&param->primary_path->dgid.global.interface_id;
        snprintf(ch->ini_guid, sizeof(ch->ini_guid), "%04x:%04x:%04x:%04x",
                 be16_to_cpu(guid[0]), be16_to_cpu(guid[1]),
                 be16_to_cpu(guid[2]), be16_to_cpu(guid[3]));
This page took 0.046441 seconds and 4 git commands to generate.