From patchwork Thu Jul 2 04:16:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ze Gan X-Patchwork-Id: 1320976 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.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=kdDtg0m5; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=cl4AZAPF; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::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 49y4ct0VZLz9s1x for ; Thu, 2 Jul 2020 14:19:58 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=VEmXV79KMXpkJ0nhSiG/eirc/ntEUSEpCugTLTjDb80=; b=kdDtg0m5mh6BZb7cutEnIg0gCg 3UVTBMOEcieBvlCqEjj6pStEigF0tIff+T/R+BoUHv1eDxaqB2ME5vvzxHXekqrgCrZK/k/7wg86v MvZ+xZMjsvL0m48IGc2JSmm982illuYAVbPcv/nOHgsxP1NLf5F6iZez13ruiSKHhcbfZ3SXPaDXN EIgvJlbG6+AsJ4G9Fyd02D9X0CNBREbGM8qOKYFVBebLxOx8JI9XGOeZGH+7+0a+HVmmIkWJf1juf m/YBcd92ftYEw1cHaKViTNOKxfJnnrIc0M7JKr/41xG+38DG/pJxEKX+LMv/OrlCOBpdd4lRAG98g ocRKBSNw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqqfZ-0000Vz-JU; Thu, 02 Jul 2020 04:17:53 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqqfV-0000VQ-T1 for hostap@lists.infradead.org; Thu, 02 Jul 2020 04:17:50 +0000 Received: by mail-pg1-x542.google.com with SMTP id w2so12015480pgg.10 for ; Wed, 01 Jul 2020 21:17:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=l1g1mYc9Eddx3LWbk2jbbtzOIN76Rb94oOwZ4TXdpZw=; b=cl4AZAPFiSsQ1T96UALLkqqgM1QbvpSyU1tiqup0ZlQarxpPVvGQwfbihoW7HnzeV9 YHkkuKb94GQWijfa70iu1+REVF2Dc49v2C9p+tRLpobsH4jlbn8ysfvrERea2qR9l6kH 8mGzjAJGDulauHbRblaKo4hDoDJ2SMSjue1koFGHwPJ7fvG0ixC20LlOsqbaNUCjIh4A Y78tEohFro575rziyVfjTgPMiUshEBtJjaCKpvIRXznMW1xMm3TZI/RSy3ojKE838qjX CxPISmjNPw0GABpawLhItvSH1QP6CR1Hhu5aYmTfUyNcMfD+yU9YaKePeqg0/dfOJhz0 P6RA== 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; bh=l1g1mYc9Eddx3LWbk2jbbtzOIN76Rb94oOwZ4TXdpZw=; b=EKNOAhiHBAr6bxD9moRmkeQagEDC222Gv25jcF7/vbg18e1SJv2pqoq9C9EpAvkXc9 /cFuEIKehyb5r7ndP8eLOCLT+8dWGafpsALH8dyVrJ+wELK64m9t9T5L8hr5OoE+tNQ2 ZD98ZYEL1baycQkv42r09fF2ZLhMSr2Y27SM3uBvx6DTkaEX7AwVfcpu7+PLGMw3Eo0O P8F+2jeGxII4zeMPp2ElJnjAt98Srs4taBTBsW+XIRRsRcVKOVOPLhSyV36a1TFjuqVv XB37EqdpdO4APZa2NAnnWog3zv1sC2BYbMp1W8uFme3lolpd/LUsp1bMvyLIKfHmV/UC bNSQ== X-Gm-Message-State: AOAM532iaQ0ukIRqWA7PP5b2Hw5LrQLO7XuO5iZ3dQ38tH+QnFEReOR9 Gx1XFmASnEIf81Pvl05LABVbkCCAvXI= X-Google-Smtp-Source: ABdhPJy7itpjeYYG4Ld7BLbjSDBrtmnGKebai5aD4a1UN15ayK44UDrovva79T1Mc/AGnrNUAFXBWQ== X-Received: by 2002:a63:dd4d:: with SMTP id g13mr22559164pgj.179.1593663466496; Wed, 01 Jul 2020 21:17:46 -0700 (PDT) Received: from localhost.localdomain ([167.220.233.206]) by smtp.gmail.com with ESMTPSA id g9sm6769316pfm.151.2020.07.01.21.17.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 21:17:46 -0700 (PDT) From: Ze Gan To: hostap@lists.infradead.org Subject: [PATCH] Fixbug : Failure in receive lowest PN setting Date: Thu, 2 Jul 2020 12:16:52 +0800 Message-Id: <20200702041652.18791-1-ganze718@gmail.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200702_001749_945837_68BFA0F3 X-CRM114-Status: UNSURE ( 9.65 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ganze718[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [ganze718[at]gmail.com] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:542 listed in] [list.dnswl.org] -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ze Gan MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org To set the PN for receive SA will fail because the SCI wasn't provided. Signed-off-by: Ze Gan --- src/drivers/driver_macsec_linux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/drivers/driver_macsec_linux.c b/src/drivers/driver_macsec_linux.c index 36a0757fe..3111e3cdc 100644 --- a/src/drivers/driver_macsec_linux.c +++ b/src/drivers/driver_macsec_linux.c @@ -712,6 +712,9 @@ static int macsec_drv_set_receive_lowest_pn(void *priv, struct receive_sa *sa) if (!msg) return ret; + if (nla_put_rxsc_config(msg, mka_sci_u64(&sa->sc->sci))) + goto nla_put_failure; + nest = nla_nest_start(msg, MACSEC_ATTR_SA_CONFIG); if (!nest) goto nla_put_failure;