From patchwork Thu Mar 19 09:05:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 1258047 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=198.145.21.10; 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=Q07tUQ8s; dkim-atps=neutral Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (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 48jgx70hDJz9sPR for ; Thu, 19 Mar 2020 20:05:45 +1100 (AEDT) Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 2FDCD10FC3635; Thu, 19 Mar 2020 02:06:33 -0700 (PDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::336; helo=mail-wm1-x336.google.com; envelope-from=matthieu.baerts@tessares.net; receiver= Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (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 77FA810FC3630 for ; Thu, 19 Mar 2020 02:06:31 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id 11so1115330wmo.2 for ; Thu, 19 Mar 2020 02:05:40 -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=GSWhz30Z4kqXYuaGsfiP70lRjuNScdZLzTUH2fc8WRM=; b=Q07tUQ8sVO+rLLAS7Uk0X7JGPuW9Q+TN4Q6pt2bhyFFCpZtV6MCoSLbqXoYnT4hjw2 UBLYA3MfcmWzpQ8xWRsgle9vgbli3e6Q3uH/Vn6C1aF5kZ4vueTBcT1TxnT7n0NAI8FP UMPFR5ur6Rp0zDtWc7rEnw3K4KAxWJn2grDK6t3hLt1pEPdcAZxPCqr3/EL1cqnEO8TO QOorywN/nhLQ+YC6331gEilfPQJrQy1JcwpX0dYrUwgr/cpfnQTlNIG24AQxveJprLZv 6IeonJC3e1JWv5+ziABhLASLlsrbJ5LetZU1crAe6Pg6hH+ahKL+MswS5q5w65J633Ul U1UA== 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=GSWhz30Z4kqXYuaGsfiP70lRjuNScdZLzTUH2fc8WRM=; b=i8cdrD5jJYfp7cgZJMzMDioCGS4jaNNI7xhnFFDwcnm5B9VRvwyLhT4QZ4BhtHjzMY mavscva4IlXuJEQYuI2zMJXXEENp03r31wc9jRDKiuVkjT/ilF8h4MjvZRuQhfbBh7vq NUDPJrlzt2RMoHMDjKKV2lPY43FZerpoYC1SeGGCgUKb72erFjcHmNVFB1hhKGDJ66LH r2n+5HsuorHpoawf7m7HSMG+7qihSlDeFdRZeHUo0M8mFxRB0xRBUpDx/CRP0L0zWT83 40KQiSRWR0TZitLfS1WeWO2SpmAJoVROnvPuo4z8GnbIzTNES4SMIglNFbh2vmcN+5eh otPQ== X-Gm-Message-State: ANhLgQ1Y1ruYmbeSW05y/eHXdXODrivX18584w4D9b1m+/neAkhxhZOt rVq37lH+tr9kZDphD27VtJqGlWXHvLw= X-Google-Smtp-Source: ADFU+vucZWyfXlssVNEDAmeUfAEIMVhVjl33R75HcjgY0MtRr7p0k3+TqUUZon8KWnphO7hdNNvdrQ== X-Received: by 2002:a05:600c:410c:: with SMTP id j12mr2492750wmi.77.1584608738673; Thu, 19 Mar 2020 02:05:38 -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 x17sm2236375wmi.28.2020.03.19.02.05.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2020 02:05:37 -0700 (PDT) From: Matthieu Baerts To: mptcp@lists.01.org Cc: Matthieu Baerts Date: Thu, 19 Mar 2020 10:05:01 +0100 Message-Id: <20200319090502.2275907-1-matthieu.baerts@tessares.net> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Message-ID-Hash: 55D6UVUBZT3PMBH6R2E55GHOF6PPSHBX X-Message-ID-Hash: 55D6UVUBZT3PMBH6R2E55GHOF6PPSHBX 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 1/2] mptcp: fix compilation error without IPV6 List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: net/mptcp/options.c: In function ‘add_addr_hmac_valid’: net/mptcp/options.c:796:39: error: ‘struct mptcp_options_received’ has no member named ‘addr6’; did you mean ‘addr’? 796 | mp_opt->addr_id, &mp_opt->addr6); | ^~~~~ | addr Fixes: 8536089ea875 (mptcp: v1 ADD_ADDR changes: add_addr_hmac_valid) Signed-off-by: Matthieu Baerts --- Notes: to be squashed in "mptcp: Add path manager interface" net/mptcp/options.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/mptcp/options.c b/net/mptcp/options.c index 1f64619be5c0..919f727cc7de 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -781,7 +781,7 @@ static void update_una(struct mptcp_sock *msk, static bool add_addr_hmac_valid(struct mptcp_subflow_context *subflow, struct mptcp_options_received *mp_opt) { - u64 hmac; + u64 hmac = 0; if (mp_opt->echo) return true; @@ -790,10 +790,12 @@ static bool add_addr_hmac_valid(struct mptcp_subflow_context *subflow, hmac = add_addr_generate_hmac(subflow->remote_key, subflow->local_key, mp_opt->addr_id, &mp_opt->addr); +#if IS_ENABLED(CONFIG_MPTCP_IPV6) else hmac = add_addr6_generate_hmac(subflow->remote_key, subflow->local_key, mp_opt->addr_id, &mp_opt->addr6); +#endif pr_debug("subflow=%p, ahmac=%llu, mp_opt->ahmac=%llu\n", subflow, (unsigned long long)hmac,