mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2026-01-26 14:13:24 +00:00
mptcp: monitor: support 'server side' as a flag
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> Signed-off-by: David Ahern <dsahern@kernel.org>
This commit is contained in:
parent
9beba226b9
commit
1be9ef2947
@ -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");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user