IB/srpt: Fix ACL lookup during login
authorBart Van Assche <bart.vanassche@wdc.com>
Wed, 3 Jan 2018 21:39:16 +0000 (13:39 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jan 2018 08:45:17 +0000 (09:45 +0100)
commit14af4f4c21968168209b37838bc8c571b562a0a6
treeebfced94d671a834e61bedcaf4aaf0d0f13c4f31
parent68807cb2b38b2e10d01e5c033eb818836b250fd1
IB/srpt: Fix ACL lookup during login

commit a1ffa4670cb97ae3a4b3e8535d88be5f643f7c3b upstream.

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>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/ulp/srpt/ib_srpt.c