From patchwork Mon Jul 27 08:38:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 1336746 X-Patchwork-Delegate: matthieu.baerts@tessares.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.01.org (client-ip=2001:19d0:306:5::1; helo=ml01.01.org; envelope-from=mptcp-bounces@lists.01.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=tessares.net Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=tessares-net.20150623.gappssmtp.com header.i=@tessares-net.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=YOPtO4Pa; dkim-atps=neutral Received: from ml01.01.org (ml01.01.org [IPv6:2001:19d0:306:5::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BFYBT737Qz9sRN for ; Mon, 27 Jul 2020 18:39:13 +1000 (AEST) Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id AEA15120A7CA4; Mon, 27 Jul 2020 01:39:08 -0700 (PDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::52c; helo=mail-ed1-x52c.google.com; envelope-from=matthieu.baerts@tessares.net; receiver= Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3640C11CB42AC for ; Mon, 27 Jul 2020 01:39:05 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id a1so11465469edt.10 for ; Mon, 27 Jul 2020 01:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ew/mvZaAa0MKQUJkHMxg0jxr2TRBwbh2Nmfpyl37I+I=; b=YOPtO4PaDJl7xCK6Q98j/ryvLGxH69Soi7XwgEOH8TVW0tq4ueZaRMMEZ6L3wOoHTN Z85yC2SZsgBaw57e44Z6+2SixCkg8TjGoVdDjGx4X4qU1jumYyfM58ftmaWyvIQ/jvLE jTnR913z115kObHfhMKioJzNV1mIhfjw5DJqX5BjbE3LEFEnIavcJ3vNVfPYI1t99Iyn od87LhIoDxed7aFqi8EMzhN4hW/WXUxbGW+SUjRIHwVPZ1zjEN3whLewqS3kpk4gYpRw CgdpRkEMIKnz/k7DxtThHX+TMKekFnu3LapPE7W/yF1JVhz6FLMZNTu4V1oSegmbhL5N B7Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ew/mvZaAa0MKQUJkHMxg0jxr2TRBwbh2Nmfpyl37I+I=; b=ScrihZPOGruEJaqq5CS9xg3MCftKQFBgcV58QD5sEE3MLR9VS2LGQf5zjHDp8mag2l ivy31Dfxj8GJDJWLMdEx6m9wsUcWSZFb2xR75c9ST5vvyvY0emeWfu3EPd+QJ0nDxjdB Rj5hBGImb1B+KOyAI/DtgM5OEqx9/MGqGxQPfc5q2OeLJOte9vYDQI/kxhgdbupAdgBP I+9A9VRGkqcsbX4ZWhgiZQPkAjKd26HIHE8ZolWmUdQqxBNmG6L5xEwD9kSofi2DPcbP yNsMER7gy0eg0dWkTVmhlUbUxfi2ftaA0fVKZRGyyh60YfqHLdYtyuI92yHRNDUVXFdm y2zw== X-Gm-Message-State: AOAM530Ofxp/7T3fp5oLTxLiR/VzGHwzJccJhkMJEDOMdwPUXWb5lqe7 YrnGZWXPPiUdYqW6kimFUPAMV6TYbM0= X-Google-Smtp-Source: ABdhPJyUaisvlg6i09zb0OhDNS3F5MAJUtxzZujfb0IfOLRG5hZ1GOyVPa8liiuIGBCDo2ehpQwC5Q== X-Received: by 2002:aa7:c251:: with SMTP id y17mr11620539edo.13.1595839142881; Mon, 27 Jul 2020 01:39:02 -0700 (PDT) Received: from tsr-vdi-mbaerts.nix.tessares.net (static.23.216.130.94.clients.your-server.de. [94.130.216.23]) by smtp.gmail.com with ESMTPSA id z25sm6522022ejd.38.2020.07.27.01.39.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 01:39:02 -0700 (PDT) From: Matthieu Baerts To: mptcp@lists.01.org Cc: Matthieu Baerts Date: Mon, 27 Jul 2020 10:38:57 +0200 Message-Id: <20200727083857.3137824-1-matthieu.baerts@tessares.net> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Message-ID-Hash: 7A5BYHC6IALEDZFV4HYWEICSCGYA3CPN X-Message-ID-Hash: 7A5BYHC6IALEDZFV4HYWEICSCGYA3CPN X-MailFrom: matthieu.baerts@tessares.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH mptcp-net] mptcp: fix joined subflows with unblocking sk List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Unblocking sockets used for outgoing connections were not containing inet info about the initial connection due to a typo there: the value of "err" variable is negative in the kernelspace. This fixes the creation of additional subflows where the remote port has to be reused if the other host didn't announce another one. This also fixes inet_diag showing blank info about MPTCP sockets from unblocking sockets doing a connect(). Fixes: 41be81a8d3d0 ("mptcp: fix unblocking connect()") Signed-off-by: Matthieu Baerts --- net/mptcp/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 3980fbb6f31e..c0abe738e7d3 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -1833,7 +1833,7 @@ static int mptcp_stream_connect(struct socket *sock, struct sockaddr *uaddr, /* on successful connect, the msk state will be moved to established by * subflow_finish_connect() */ - if (!err || err == EINPROGRESS) + if (!err || err == -EINPROGRESS) mptcp_copy_inaddrs(sock->sk, ssock->sk); else inet_sk_state_store(sock->sk, inet_sk_state_load(ssock->sk));