mptcp: address lookup improvements
authorPaolo Abeni <pabeni@redhat.com>
Mon, 11 Jul 2022 19:16:30 +0000 (12:16 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 13 Jul 2022 01:37:19 +0000 (18:37 -0700)
commitbedee0b561138346967cf1443f2afd1b48b3148f
tree1fbdc0a4fea9d5df1bc684642ab25083e75e16ed
parentf5360e9b314caed58970e811ae80a4c351e2ce8a
mptcp: address lookup improvements

When looking-up a socket address in the endpoint list, we
must prefer port-based matches over address only match.

Ensure that port-based endpoints are listed first, using
head insertion for them. Additionally be sure that only
port-based endpoints carry a non zero port number.

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/pm_netlink.c