Commit f02ab9d1 authored by Anna Schumaker's avatar Anna Schumaker Committed by Greg Kroah-Hartman
Browse files

sunrpc: Fix return value of get_srcport()



[ Upstream commit 5d46dd04 ]

Since bc1c56e9 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: bc1c56e9 (SUNRPC: prevent port reuse on transports which don't request it)
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 21a2be1a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment