mptcp: unify RM_ADDR and RM_SUBFLOW receiving
authorGeliang Tang <geliangtang@gmail.com>
Wed, 31 Mar 2021 00:08:52 +0000 (17:08 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Mar 2021 00:42:23 +0000 (17:42 -0700)
commit9f12e97bf16cb4032ae199537e5a1500dfafee90
tree9bf24caa849b9a250db3c332b3f6647613ab16f2
parent774c8a8dcb3cba72e37394dbc7803fe575e1292c
mptcp: unify RM_ADDR and RM_SUBFLOW receiving

There are some duplicate code in mptcp_pm_nl_rm_addr_received and
mptcp_pm_nl_rm_subflow_received. This patch unifies them into a new
function named mptcp_pm_nl_rm_addr_or_subflow. In it, use the input
parameter rm_type to identify it's now removing an address or a subflow.

Suggested-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/pm_netlink.c