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: [email protected] Fixes: f8c9dfb ("mptcp: add pm listener events") Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Paolo Abeni <[email protected]> Signed-off-by: Mat Martineau <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 016e7ba commit 21d9b73

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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)