diff options
| author | Geliang Tang <[email protected]> | 2024-03-05 11:04:31 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2024-03-07 04:24:10 +0000 |
| commit | 6a42477fe4491e454aaeabfed5708d1eff5ff2ad (patch) | |
| tree | dc09af69cb1d778cf4e99414aba205f63ed02961 /net/mptcp/pm.c | |
| parent | mptcp: drop duplicate header inclusions (diff) | |
| download | kernel-6a42477fe4491e454aaeabfed5708d1eff5ff2ad.tar.gz kernel-6a42477fe4491e454aaeabfed5708d1eff5ff2ad.zip | |
mptcp: update set_flags interfaces
This patch updates set_flags interfaces, make it more similar to the
interfaces of dump_addr and get_addr:
mptcp_pm_set_flags(struct sk_buff *skb, struct genl_info *info)
mptcp_pm_nl_set_flags(struct sk_buff *skb, struct genl_info *info)
mptcp_userspace_pm_set_flags(struct sk_buff *skb, struct genl_info *info)
Signed-off-by: Geliang Tang <[email protected]>
Reviewed-by: Matthieu Baerts (NGI0) <[email protected]>
Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
Link: https://lore.kernel.org/r/20240305-upstream-net-next-20240304-mptcp-misc-cleanup-v1-2-c436ba5e569b@kernel.org
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/mptcp/pm.c')
| -rw-r--r-- | net/mptcp/pm.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c index 28e5d514bf20..55406720c607 100644 --- a/net/mptcp/pm.c +++ b/net/mptcp/pm.c @@ -456,13 +456,11 @@ int mptcp_pm_dump_addr(struct sk_buff *msg, struct netlink_callback *cb) return mptcp_pm_nl_dump_addr(msg, cb); } -int mptcp_pm_set_flags(struct net *net, struct nlattr *token, - struct mptcp_pm_addr_entry *loc, - struct mptcp_pm_addr_entry *rem, u8 bkup) +int mptcp_pm_set_flags(struct sk_buff *skb, struct genl_info *info) { - if (token) - return mptcp_userspace_pm_set_flags(net, token, loc, rem, bkup); - return mptcp_pm_nl_set_flags(net, loc, bkup); + if (info->attrs[MPTCP_PM_ATTR_TOKEN]) + return mptcp_userspace_pm_set_flags(skb, info); + return mptcp_pm_nl_set_flags(skb, info); } void mptcp_pm_subflow_chk_stale(const struct mptcp_sock *msk, struct sock *ssk) |
