RDMA/irdma: Add ipv4 check to irdma_find_listener()
authorTatyana Nikolova <tatyana.e.nikolova@intel.com>
Wed, 15 Mar 2023 14:52:31 +0000 (09:52 -0500)
committerLeon Romanovsky <leon@kernel.org>
Sun, 19 Mar 2023 09:37:56 +0000 (11:37 +0200)
commite4522c097ec10f23ea0933e9e69d4fa9d8ae9441
treeda9dbfbc0270a2f88afb7269cb32515b8dbc941c
parent8385a875c9eecc429b2f72970efcbb0e5cb5b547
RDMA/irdma: Add ipv4 check to irdma_find_listener()

Add ipv4 check to irdma_find_listener(). Otherwise the function
incorrectly finds and returns a listener with a different addr family for
the zero IP addr, if a listener with a zero IP addr and the same port as
the one searched for has already been created.

Fixes: 146b9756f14c ("RDMA/irdma: Add connection manager")
Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Link: https://lore.kernel.org/r/20230315145231.931-5-shiraz.saleem@intel.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/irdma/cm.c