Some counters from mptcp_info structure were stored as an unsigned
number (u8) but displayed as a signed one.
Even if it is unlikely these u8 counters -- number of subflows and
ADD_ADDR -- have a value bigger than 2^7, it still sounds better to
display them as unsigned.
Fixes: 9c3be2c0 ("ss: mptcp: add msk diag interface support")
Acked-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
misc/ss.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/misc/ss.c b/misc/ss.c
index c71b08f9..34f82176 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -3232,17 +3232,17 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r,
static void mptcp_stats_print(struct mptcp_info *s)
{
if (s->mptcpi_subflows)
- out(" subflows:%d", s->mptcpi_subflows);
+ out(" subflows:%u", s->mptcpi_subflows);
if (s->mptcpi_add_addr_signal)
- out(" add_addr_signal:%d", s->mptcpi_add_addr_signal);
+ out(" add_addr_signal:%u", s->mptcpi_add_addr_signal);
if (s->mptcpi_add_addr_accepted)
- out(" add_addr_accepted:%d", s->mptcpi_add_addr_accepted);
+ out(" add_addr_accepted:%u", s->mptcpi_add_addr_accepted);
if (s->mptcpi_subflows_max)
- out(" subflows_max:%d", s->mptcpi_subflows_max);
+ out(" subflows_max:%u", s->mptcpi_subflows_max);
if (s->mptcpi_add_addr_signal_max)
- out(" add_addr_signal_max:%d", s->mptcpi_add_addr_signal_max);
+ out(" add_addr_signal_max:%u", s->mptcpi_add_addr_signal_max);
if (s->mptcpi_add_addr_accepted_max)
- out(" add_addr_accepted_max:%d", s->mptcpi_add_addr_accepted_max);
+ out(" add_addr_accepted_max:%u", s->mptcpi_add_addr_accepted_max);
if (s->mptcpi_flags & MPTCP_INFO_FLAG_FALLBACK)
out(" fallback");
if (s->mptcpi_flags & MPTCP_INFO_FLAG_REMOTE_KEY_RECEIVED)
--
2.40.1