From: Matthieu Baerts (NGI0) Date: Mon, 24 Nov 2025 11:19:24 +0000 (+0100) Subject: mptcp: monitor: add 'server side' info X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18e46e81805814243279f169eadf9103bf65c80f;p=thirdparty%2Fiproute2.git mptcp: monitor: add 'server side' info This info has been added a while ago in the kernel [1], but it was not displayed in 'ip monitor'. Now, 'server_side' is displayed if the attribute is defined and set to true. It looks better to do that instead of showing server_side=0. Note that since v6.18 [2], this attribute is only defined if it is set to true. Link: https://git.kernel.org/torvalds/c/41b3c69bf941 [1] Link: https://git.kernel.org/torvalds/c/c9809f03c158 [2] Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David Ahern --- diff --git a/ip/ipmptcp.c b/ip/ipmptcp.c index 2908b69e..aaacc0a5 100644 --- a/ip/ipmptcp.c +++ b/ip/ipmptcp.c @@ -536,6 +536,8 @@ static int mptcp_monitor_msg(struct rtnl_ctrl_data *ctrl, printf(" reset_reason=%u", rta_getattr_u32(tb[MPTCP_ATTR_RESET_REASON])); if (tb[MPTCP_ATTR_RESET_FLAGS]) printf(" reset_flags=0x%x", rta_getattr_u32(tb[MPTCP_ATTR_RESET_FLAGS])); + if (tb[MPTCP_ATTR_SERVER_SIDE] && rta_getattr_u8(tb[MPTCP_ATTR_SERVER_SIDE])) + printf(" server_side"); puts(""); out: