Skip to content

Commit a1ffa46

Browse files
KAGA-KOKOjgunthorpe
authored andcommitted
IB/srpt: Fix ACL lookup during login
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 2bce1a6 ("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]>
1 parent bec40c2 commit a1ffa46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/ulp/srpt/ib_srpt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2077,7 +2077,7 @@ static int srpt_cm_req_recv(struct ib_cm_id *cm_id,
20772077
goto destroy_ib;
20782078
}
20792079

2080-
guid = (__be16 *)&param->primary_path->sgid.global.interface_id;
2080+
guid = (__be16 *)&param->primary_path->dgid.global.interface_id;
20812081
snprintf(ch->ini_guid, sizeof(ch->ini_guid), "%04x:%04x:%04x:%04x",
20822082
be16_to_cpu(guid[0]), be16_to_cpu(guid[1]),
20832083
be16_to_cpu(guid[2]), be16_to_cpu(guid[3]));

0 commit comments

Comments
 (0)