mptcp: avoid unneeded address copy
authorPaolo Abeni <pabeni@redhat.com>
Mon, 27 Mar 2023 10:22:21 +0000 (12:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Mar 2023 08:01:28 +0000 (09:01 +0100)
In the syn_recv fallback path, the msk is unused. We can skip
setting the socket address.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/subflow.c

index dadaf85..a11f4c5 100644 (file)
@@ -821,8 +821,6 @@ create_child:
                                goto dispose_child;
                        }
 
-                       if (new_msk)
-                               mptcp_copy_inaddrs(new_msk, child);
                        mptcp_subflow_drop_ctx(child);
                        goto out;
                }