mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
mptcp: netlink: Add MPTCP_PM_CMD_REMOVE
This change adds a MPTCP netlink command for issuing a
REMOVE_ADDR signal for an address over the chosen MPTCP
connection from a userspace path manager.
The command requires the following parameters: {token, loc_id}.
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Kishen Maloor <kishen.maloor@intel.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
9a0b36509d
commit
d9a4594eda
@@ -1095,6 +1095,7 @@ static const struct nla_policy mptcp_pm_policy[MPTCP_PM_ATTR_MAX + 1] = {
|
||||
[MPTCP_PM_ATTR_RCV_ADD_ADDRS] = { .type = NLA_U32, },
|
||||
[MPTCP_PM_ATTR_SUBFLOWS] = { .type = NLA_U32, },
|
||||
[MPTCP_PM_ATTR_TOKEN] = { .type = NLA_U32, },
|
||||
[MPTCP_PM_ATTR_LOC_ID] = { .type = NLA_U8, },
|
||||
};
|
||||
|
||||
void mptcp_pm_nl_subflow_chk_stale(const struct mptcp_sock *msk, struct sock *ssk)
|
||||
@@ -1504,8 +1505,8 @@ static int mptcp_nl_cmd_del_addr(struct sk_buff *skb, struct genl_info *info)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void mptcp_pm_remove_addrs_and_subflows(struct mptcp_sock *msk,
|
||||
struct list_head *rm_list)
|
||||
void mptcp_pm_remove_addrs_and_subflows(struct mptcp_sock *msk,
|
||||
struct list_head *rm_list)
|
||||
{
|
||||
struct mptcp_rm_list alist = { .nr = 0 }, slist = { .nr = 0 };
|
||||
struct mptcp_pm_addr_entry *entry;
|
||||
@@ -2204,6 +2205,11 @@ static const struct genl_small_ops mptcp_pm_ops[] = {
|
||||
.doit = mptcp_nl_cmd_announce,
|
||||
.flags = GENL_ADMIN_PERM,
|
||||
},
|
||||
{
|
||||
.cmd = MPTCP_PM_CMD_REMOVE,
|
||||
.doit = mptcp_nl_cmd_remove,
|
||||
.flags = GENL_ADMIN_PERM,
|
||||
},
|
||||
};
|
||||
|
||||
static struct genl_family mptcp_genl_family __ro_after_init = {
|
||||
|
||||
Reference in New Issue
Block a user