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>] [day] [month] [year] [list]
Message-Id: <20250916-mptcp-attr-sign-v1-1-316aa96b93ca@kernel.org>
Date: Tue, 16 Sep 2025 11:24:33 +0200
From: "Matthieu Baerts (NGI0)" <matttbe@...nel.org>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: MPTCP Linux <mptcp@...ts.linux.dev>, netdev@...r.kernel.org, 
 "Matthieu Baerts (NGI0)" <matttbe@...nel.org>
Subject: [PATCH iproute] mptcp: fix event attributes type

The 'backup' and 'error' attributes are unsigned.

Even if, for the moment, >2^7 values are not expected, they should be
printed as unsigned (%u) and not as signed (%d).

Fixes: ff619e4f ("mptcp: add support for event monitoring")
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@...nel.org>
---
 ip/ipmptcp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ip/ipmptcp.c b/ip/ipmptcp.c
index 118bac4a42a1ea3ce9710510df1353683eb29c89..2415cac8a36089da0e1c42995c06535a08305de7 100644
--- a/ip/ipmptcp.c
+++ b/ip/ipmptcp.c
@@ -522,9 +522,9 @@ static int mptcp_monitor_msg(struct rtnl_ctrl_data *ctrl,
 	if (tb[MPTCP_ATTR_DPORT])
 		printf(" dport=%u", rta_getattr_be16(tb[MPTCP_ATTR_DPORT]));
 	if (tb[MPTCP_ATTR_BACKUP])
-		printf(" backup=%d", rta_getattr_u8(tb[MPTCP_ATTR_BACKUP]));
+		printf(" backup=%u", rta_getattr_u8(tb[MPTCP_ATTR_BACKUP]));
 	if (tb[MPTCP_ATTR_ERROR])
-		printf(" error=%d", rta_getattr_u8(tb[MPTCP_ATTR_ERROR]));
+		printf(" error=%u", rta_getattr_u8(tb[MPTCP_ATTR_ERROR]));
 	if (tb[MPTCP_ATTR_FLAGS])
 		printf(" flags=%x", rta_getattr_u16(tb[MPTCP_ATTR_FLAGS]));
 	if (tb[MPTCP_ATTR_TIMEOUT])

---
base-commit: bd63ac4980f3d405f4b785fdfe45ba9284b052af
change-id: 20250916-mptcp-attr-sign-f723450dbfa9

Best regards,
-- 
Matthieu Baerts (NGI0) <matttbe@...nel.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ