]> git.feebdaed.xyz Git - 0xmirror/iproute2.git/commitdiff
mptcp: monitor: add 'server side' info
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Mon, 24 Nov 2025 11:19:24 +0000 (12:19 +0100)
committerDavid Ahern <dsahern@kernel.org>
Tue, 2 Dec 2025 02:28:05 +0000 (19:28 -0700)
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
Link: https://git.kernel.org/torvalds/c/c9809f03c158
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
ip/ipmptcp.c

index 2908b69ed16d6ffa41052ada7518d67ddcd99746..aaacc0a5b778886ed09863e7a329d342df4f4188 100644 (file)
@@ -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: