Skip to content

Commit 21d9b73

Browse files
Paolo Abenikuba-moo
authored andcommitted
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: f8c9dfb ("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>
1 parent 016e7ba commit 21d9b73

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

net/mptcp/protocol.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3723,10 +3723,9 @@ static int mptcp_listen(struct socket *sock, int backlog)
37233723
if (!err) {
37243724
sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1);
37253725
mptcp_copy_inaddrs(sk, ssock->sk);
3726+
mptcp_event_pm_listener(ssock->sk, MPTCP_EVENT_LISTENER_CREATED);
37263727
}
37273728

3728-
mptcp_event_pm_listener(ssock->sk, MPTCP_EVENT_LISTENER_CREATED);
3729-
37303729
unlock:
37313730
release_sock(sk);
37323731
return err;

0 commit comments

Comments
 (0)