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 2bce1a6d2209 ("IB/srpt: Accept GUIDs as port names")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>

authored by Bart Van Assche and committed by Jason Gunthorpe a1ffa467 bec40c26

+1 -1
+1 -1
drivers/infiniband/ulp/srpt/ib_srpt.c
··· 2077 2077 goto destroy_ib; 2078 2078 } 2079 2079 2080 - guid = (__be16 *)&param->primary_path->sgid.global.interface_id; 2080 + guid = (__be16 *)&param->primary_path->dgid.global.interface_id; 2081 2081 snprintf(ch->ini_guid, sizeof(ch->ini_guid), "%04x:%04x:%04x:%04x", 2082 2082 be16_to_cpu(guid[0]), be16_to_cpu(guid[1]), 2083 2083 be16_to_cpu(guid[2]), be16_to_cpu(guid[3]));