All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
To: MPTCP Linux <mptcp@lists.linux.dev>
Cc: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
Subject: [PATCH iproute-mptcp 6/6] mptcp: monitor: support 'server side' as a flag
Date: Wed, 12 Nov 2025 17:24:49 +0100	[thread overview]
Message-ID: <20251112-laminar-v1-6-e23dbf584aa4@kernel.org> (raw)
In-Reply-To: <20251112-laminar-v1-0-e23dbf584aa4@kernel.org>

In the v6.18 kernel, the 'server side' attribute has been deprecated [1]
in favour of the 'server side' flag [2].

Support both: first checking the new flag, then the old attribute to
continue supporting older kernels.

Link: https://git.kernel.org/torvalds/c/c8bc168f5f3d [1]
Link: https://git.kernel.org/torvalds/c/3d7ae91107b8 [2]
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
 ip/ipmptcp.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/ip/ipmptcp.c b/ip/ipmptcp.c
index 01f6906f..acd008f3 100644
--- a/ip/ipmptcp.c
+++ b/ip/ipmptcp.c
@@ -535,11 +535,14 @@ 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");
 
 	if (tb[MPTCP_ATTR_FLAGS])
 		flags = rta_getattr_u16(tb[MPTCP_ATTR_FLAGS]);
+	if ((flags & MPTCP_PM_EV_FLAG_SERVER_SIDE) ||
+	    (tb[MPTCP_ATTR_SERVER_SIDE] && rta_getattr_u8(tb[MPTCP_ATTR_SERVER_SIDE]))) {
+		flags &= ~MPTCP_PM_EV_FLAG_SERVER_SIDE;
+		printf(" server_side");
+	}
 	if (flags & MPTCP_PM_EV_FLAG_DENY_JOIN_ID0) {
 		flags &= ~MPTCP_PM_EV_FLAG_DENY_JOIN_ID0;
 		printf(" deny_join_id0");

-- 
2.51.0


      parent reply	other threads:[~2025-11-12 16:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12 16:24 [PATCH iproute-mptcp 0/6] mptcp: new endpoint type and info flags Matthieu Baerts (NGI0)
2025-11-12 16:24 ` [PATCH iproute-mptcp 1/6] MAINTAINERS: add entry for mptcp Matthieu Baerts (NGI0)
2025-11-12 16:24 ` [PATCH iproute-mptcp 2/6] man: mptcp: fix minor typos Matthieu Baerts (NGI0)
2025-11-12 16:24 ` [PATCH iproute-mptcp 3/6] mptcp: add 'laminar' endpoint support Matthieu Baerts (NGI0)
2025-11-17 16:48   ` Matthieu Baerts
2025-11-12 16:24 ` [PATCH iproute-mptcp 4/6] mptcp: monitor: add 'server side' info Matthieu Baerts (NGI0)
2025-11-12 16:24 ` [PATCH iproute-mptcp 5/6] mptcp: monitor: add 'deny join id0' info Matthieu Baerts (NGI0)
2025-11-12 16:24 ` Matthieu Baerts (NGI0) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251112-laminar-v1-6-e23dbf584aa4@kernel.org \
    --to=matttbe@kernel.org \
    --cc=mptcp@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.