From: Matthieu Baerts (NGI0) Date: Tue, 16 Sep 2025 09:24:33 +0000 (+0200) Subject: mptcp: fix event attributes type X-Git-Tag: v6.17.0~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=230d1e52a07401f8ad192e29e1c2130c3fdf5265;p=thirdparty%2Fiproute2.git 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) Signed-off-by: Stephen Hemminger --- diff --git a/ip/ipmptcp.c b/ip/ipmptcp.c index 118bac4a..2415cac8 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])