diff options
author | Paolo Abeni <pabeni@redhat.com> | 2023-07-25 11:34:56 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-07-26 16:48:54 -0700 |
commit | 21d9b73a7d5241905367098d260a3c68b811da32 (patch) | |
tree | f49ca03ee5951bba05de25cc5475291ec61d5ee9 /net/mptcp | |
parent | 016e7ba47f33064fbef8c4307a2485d2669dfd03 (diff) | |
download | linux-stable-21d9b73a7d5241905367098d260a3c68b811da32.tar.gz linux-stable-21d9b73a7d5241905367098d260a3c68b811da32.tar.bz2 linux-stable-21d9b73a7d5241905367098d260a3c68b811da32.zip |
mptcp: more accurate NL event generation
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.
Cc: stable@vger.kernel.org
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>
Link: https://lore.kernel.org/r/20230725-send-net-20230725-v1-2-6f60fe7137a9@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp')
-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 3613489eb6e3..3317d1cca156 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; |