Message ID | 20230110-mptcp-events-listener-net-v1-1-88a946722fe7@tessares.net (mailing list archive) |
---|---|
State | Accepted |
Commit | e2e81aa20f734bada7ca245ad88ff7a6ae6f2630 |
Delegated to: | Stephen Hemminger |
Headers | show |
Series | [iproute2] mptcp: add new listener events | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
Hello: This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <stephen@networkplumber.org>: On Tue, 10 Jan 2023 16:36:20 +0100 you wrote: > These new events have been added in kernel commit f8c9dfbd875b ("mptcp: > add pm listener events") by Geliang Tang. > > Two new MPTCP Netlink event types for PM listening socket creation and > closure have been recently added. They will be available in the future > v6.2 kernel. > > [...] Here is the summary with links: - [iproute2] mptcp: add new listener events https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=e2e81aa20f73 You are awesome, thank you!
diff --git a/ip/ipmptcp.c b/ip/ipmptcp.c index ce62ab9a..beba7a41 100644 --- a/ip/ipmptcp.c +++ b/ip/ipmptcp.c @@ -454,6 +454,8 @@ static const char * const event_to_str[] = { [MPTCP_EVENT_SUB_ESTABLISHED] = "SF_ESTABLISHED", [MPTCP_EVENT_SUB_CLOSED] = "SF_CLOSED", [MPTCP_EVENT_SUB_PRIORITY] = "SF_PRIO", + [MPTCP_EVENT_LISTENER_CREATED] = "LISTENER_CREATED", + [MPTCP_EVENT_LISTENER_CLOSED] = "LISTENER_CLOSED", }; static void print_addr(const char *key, int af, struct rtattr *value) @@ -492,11 +494,12 @@ static int mptcp_monitor_msg(struct rtnl_ctrl_data *ctrl, goto out; } - printf("[%14s]", event_to_str[ghdr->cmd]); + printf("[%16s]", event_to_str[ghdr->cmd]); parse_rtattr(tb, MPTCP_ATTR_MAX, (void *) ghdr + GENL_HDRLEN, len); - printf(" token=%08x", rta_getattr_u32(tb[MPTCP_ATTR_TOKEN])); + if (tb[MPTCP_ATTR_TOKEN]) + printf(" token=%08x", rta_getattr_u32(tb[MPTCP_ATTR_TOKEN])); if (tb[MPTCP_ATTR_REM_ID]) printf(" remid=%u", rta_getattr_u8(tb[MPTCP_ATTR_REM_ID]));