[PATCH iproute] mptcp: fix event attributes type

Matthieu Baerts (NGI0) posted 1 patch 1 day, 5 hours ago
Failed in applying to current master (apply log)
ip/ipmptcp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH iproute] mptcp: fix event attributes type
Posted by Matthieu Baerts (NGI0) 1 day, 5 hours ago
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@kernel.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@kernel.org>