[PATCH mptcp-next 5/7] mptcp: set fullmesh flag in pm_netlink

Geliang Tang posted 7 patches 4 months, 2 weeks ago
Maintainers: Matthieu Baerts <matthieu.baerts@tessares.net>, Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Mat Martineau <mathew.j.martineau@linux.intel.com>, "David S. Miller" <davem@davemloft.net>
[PATCH mptcp-next 5/7] mptcp: set fullmesh flag in pm_netlink
Posted by Geliang Tang 4 months, 2 weeks ago
This patch added the fullmesh flag setting and clearing support in
pm_netlink.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 net/mptcp/pm_netlink.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index da1bef34e8e6..5fcf0f979579 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -1766,6 +1766,13 @@ static int __mptcp_nl_cmd_set_flags(struct sk_buff *skb,
 					entry->flags &= ~MPTCP_PM_ADDR_FLAG_BACKUP;
 				else
 					entry->flags |= MPTCP_PM_ADDR_FLAG_BACKUP;
+			} else if (addr.flags & MPTCP_PM_ADDR_FLAG_FULLMESH) {
+				mptcp_nl_remove_subflow_and_signal_addr(net, &entry->addr);
+				if (clear_flags)
+					entry->flags &= ~MPTCP_PM_ADDR_FLAG_FULLMESH;
+				else
+					entry->flags |= MPTCP_PM_ADDR_FLAG_FULLMESH;
+				mptcp_nl_add_subflow_or_signal_addr(net);
 			}
 		}
 	}
-- 
2.31.1