Files
linux/net/sunrpc/xprtsock.c
Anna Schumaker c13449c61f sunrpc: Fix return value of get_srcport()
[ Upstream commit 5d46dd04cb ]

Since bc1c56e9bb transport->srcport may by unset, causing
get_srcport() to return 0 when called. Fix this by querying the port
from the underlying socket instead of the transport.

Fixes: bc1c56e9bb (SUNRPC: prevent port reuse on transports which don't request it)
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-18 13:43:29 +02:00

82 KiB