mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 06:33:07 +00:00
mptcp: more accurate NL event generation
commit21d9b73a7d
upstream. 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:f8c9dfbd87
("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8aba7fb254
commit
c58951ccef
1 changed files with 1 additions and 2 deletions
|
@ -3717,10 +3717,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;
|
||||
|
|
Loading…
Reference in a new issue