[PATCH iproute2-next] Squash to "mptcp: add the fullmesh flag setting support"

Geliang Tang posted 1 patch 1 week, 6 days ago
Failed in applying to current master (apply log)
ip/ipmptcp.c | 5 +++++
1 file changed, 5 insertions(+)

[PATCH iproute2-next] Squash to "mptcp: add the fullmesh flag setting support"

Posted by Geliang Tang 1 week, 6 days ago
Add the fullmesh flag check for the adding address too.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 ip/ipmptcp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ip/ipmptcp.c b/ip/ipmptcp.c
index ee786537..646e5200 100644
--- a/ip/ipmptcp.c
+++ b/ip/ipmptcp.c
@@ -118,6 +118,11 @@ static int mptcp_parse_opt(int argc, char **argv, struct nlmsghdr *n, int cmd)
 	ll_init_map(&rth);
 	while (argc > 0) {
 		if (get_flags(*argv, &flags) == 0) {
+			if (adding &&
+			    (flags & MPTCP_PM_ADDR_FLAG_SIGNAL) &&
+			    (flags & MPTCP_PM_ADDR_FLAG_FULLMESH))
+				invarg("invalid flags\n", *argv);
+
 			/* allow changing the 'backup' flag only */
 			if (cmd == MPTCP_PM_CMD_SET_FLAGS &&
 			    (flags & ~MPTCP_PM_ADDR_FLAG_BACKUP) &&
-- 
2.31.1