diff options
author | Paolo Abeni <pabeni@redhat.com> | 2023-07-25 18:25:29 +0200 |
---|---|---|
committer | Mat Martineau <martineau@kernel.org> | 2023-07-25 10:36:17 -0700 |
commit | 120f3eb8ec78ddaed2241aec9b870e8c9ab0c642 (patch) | |
tree | 89607e28a9fb2413a58260b4386a5a75c1c60a12 | |
parent | 958a3e2fd8c73e9891404e71abb81c4284dcb868 (diff) | |
download | linux-send-net-20230725.tar.gz |
mptcp: more accurate NL event generationsend-net-20230725
Currently the mptcp code generate a "new listener" event even
if the actual listen() syscall fails. Address the issue moving
the event generation call under the successful branch.
Fixes: f8c9dfbd875b ("mptcp: add pm listener events")
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <martineau@kernel.org>
-rw-r--r-- | net/mptcp/protocol.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 3613489eb6e3b0..3317d1cca15688 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -3723,10 +3723,9 @@ static int mptcp_listen(struct socket *sock, int backlog) if (!err) { sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1); mptcp_copy_inaddrs(sk, ssock->sk); + mptcp_event_pm_listener(ssock->sk, MPTCP_EVENT_LISTENER_CREATED); } - mptcp_event_pm_listener(ssock->sk, MPTCP_EVENT_LISTENER_CREATED); - unlock: release_sock(sk); return err; |