lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ea7d8eb1-5484-09dc-aa53-cf839b93bc73@163.com>
Date:   Fri, 23 Apr 2021 18:24:50 +0800
From:   Jianguo Wu <wujianguo106@....com>
To:     netdev@...r.kernel.org
Cc:     mptcp@...ts.linux.dev, Paolo Abeni <pabeni@...hat.com>,
        dsahern@...nel.org
Subject: [PATCH iproute2] mptcp: make sure flag signal is set when add addr
 with port

From: Jianguo Wu <wujianguo@...natelecom.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@...natelecom.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ