IB/core: Honor port_num while resolving GID for IB link layer
authorParav Pandit <parav@mellanox.com>
Tue, 13 Mar 2018 14:06:14 +0000 (16:06 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 15 Mar 2018 20:40:37 +0000 (14:40 -0600)
commit563c4ba3bd2b8b0b21c65669ec2226b1cfa1138b
tree5ecde412e1951d707c8f09db5d214587dc3784d8
parent6d337179f28cc50ddd7e224f677b4cda70b275fc
IB/core: Honor port_num while resolving GID for IB link layer

ah_attr contains the port number to which cm_id is bound. However, while
searching for GID table for matching GID entry, the port number is
ignored.

This could cause the wrong GID to be used when the ah_attr is converted to
an AH.

Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/multicast.c