All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2] mptcp: make sure flag signal is set when add addr with port
@ 2021-04-23 10:24 Jianguo Wu
  2021-04-30  9:35 ` Matthieu Baerts
  0 siblings, 1 reply; 4+ messages in thread
From: Jianguo Wu @ 2021-04-23 10:24 UTC (permalink / raw)
  To: netdev; +Cc: mptcp, Paolo Abeni, dsahern

From: Jianguo Wu <wujianguo@chinatelecom.cn>

When add address with port, it is mean to send an ADD_ADDR to remote,
so it must have flag signal set.

Fixes: 42fbca91cd61 ("mptcp: add support for port based endpoint")
Signed-off-by: Jianguo Wu <wujianguo@chinatelecom.cn>
---
 ip/ipmptcp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ip/ipmptcp.c b/ip/ipmptcp.c
index 5f490f0..44af723 100644
--- a/ip/ipmptcp.c
+++ b/ip/ipmptcp.c
@@ -143,6 +143,9 @@ static int mptcp_parse_opt(int argc, char **argv, struct nlmsghdr *n,
 	if (!id_set && !adding)
 		missarg("ID");

+	if (port && !(flags & MPTCP_PM_ADDR_FLAG_SIGNAL))
+		invarg("flags must have signal when using port", "port");
+
 	attr_addr = addattr_nest(n, MPTCP_BUFLEN,
 				 MPTCP_PM_ATTR_ADDR | NLA_F_NESTED);
 	if (id_set)
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-30 14:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23 10:24 [PATCH iproute2] mptcp: make sure flag signal is set when add addr with port Jianguo Wu
2021-04-30  9:35 ` Matthieu Baerts
2021-04-30 14:27   ` David Ahern
2021-04-30 14:50     ` Matthieu Baerts

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.