diff mbox series

[iproute2] mptcp: make sure flag signal is set when add addr with port

Message ID ea7d8eb1-5484-09dc-aa53-cf839b93bc73@163.com
State New
Headers show
Series [iproute2] mptcp: make sure flag signal is set when add addr with port | expand

Commit Message

Jianguo Wu April 23, 2021, 10:24 a.m. UTC
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(+)

Comments

Matthieu Baerts April 30, 2021, 9:35 a.m. UTC | #1
Hi David,

Thank you for maintaining iproute2-next!

On 23/04/2021 12:24, Jianguo Wu wrote:
> 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>


I see on patchwork[1] that this patch is marked as "Accepted". But I
cannot find it in 'main' branches from iproute2-next.git and
iproute2.git repos.

Did I miss it somewhere?

If it is not too late, here is a ACK from MPTCP team:

Acked-by: Matthieu Baerts <matthieu.baerts@tessares.net>


Thanks Jianguo for this patch!

Cheers,
Matt

[1]
https://patchwork.kernel.org/project/netdevbpf/patch/ea7d8eb1-5484-09dc-aa53-cf839b93bc73@163.com/
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
David Ahern April 30, 2021, 2:27 p.m. UTC | #2
On 4/30/21 3:35 AM, Matthieu Baerts wrote:
> On 23/04/2021 12:24, Jianguo Wu wrote:

>> 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>

> 

> I see on patchwork[1] that this patch is marked as "Accepted". But I

> cannot find it in 'main' branches from iproute2-next.git and

> iproute2.git repos.

> 

> Did I miss it somewhere?


no idea what happened

> 

> If it is not too late, here is a ACK from MPTCP team:

> 

> Acked-by: Matthieu Baerts <matthieu.baerts@tessares.net>

> 


I'll add the Ack and apply.
Matthieu Baerts April 30, 2021, 2:50 p.m. UTC | #3
On 30/04/2021 16:27, David Ahern wrote:
> On 4/30/21 3:35 AM, Matthieu Baerts wrote:

>> On 23/04/2021 12:24, Jianguo Wu wrote:

>>> 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>

>>

>> I see on patchwork[1] that this patch is marked as "Accepted". But I

>> cannot find it in 'main' branches from iproute2-next.git and

>> iproute2.git repos.

>>

>> Did I miss it somewhere?

> 

> no idea what happened

> 

>>

>> If it is not too late, here is a ACK from MPTCP team:

>>

>> Acked-by: Matthieu Baerts <matthieu.baerts@tessares.net>

>>

> 

> I'll add the Ack and apply.


Thank you for your help!

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
diff mbox series

Patch

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)