diff options
author | Kishen Maloor <kishen.maloor@intel.com> | 2022-05-02 13:52:36 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-05-03 16:54:55 -0700 |
commit | 41b3c69bf9414375319290c59f198ff5c71d273f (patch) | |
tree | 51f6d54db529fca1d3e475b0f1d170b7ffc7a39d /net/mptcp | |
parent | 70c708e82606f842dc1bcf0943b8acae30c4088f (diff) |
mptcp: expose server_side attribute in MPTCP netlink events
This change records the 'server_side' attribute of MPTCP_EVENT_CREATED
and MPTCP_EVENT_ESTABLISHED events to inform their recipient about the
Client/Server role of the running MPTCP application.
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/246
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Kishen Maloor <kishen.maloor@intel.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp')
-rw-r--r-- | net/mptcp/pm_netlink.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index eeaa96bcae6c..a4430c576ce9 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -1985,6 +1985,9 @@ static int mptcp_event_created(struct sk_buff *skb, if (err) return err; + if (nla_put_u8(skb, MPTCP_ATTR_SERVER_SIDE, READ_ONCE(msk->pm.server_side))) + return -EMSGSIZE; + return mptcp_event_add_subflow(skb, ssk); } |