From patchwork Fri Oct 13 09:45:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Davide Caratti X-Patchwork-Id: 13420598 X-Patchwork-Delegate: matthieu.baerts@tessares.net Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B912E101DD for ; Fri, 13 Oct 2023 09:46:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gI3g1BBD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697190368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mWH5bBtPLsRqkYF2m7QH+8PmhDxvJCZJudFb07XM1Lw=; b=gI3g1BBDXGBfzfxU+JDvDo0oOKXZ1dsLjhlmthnsJGXd9d9UwI3EUxq3ux6nwN/LrCxNFn lttY1KFMxMnHxH2KVvERivZgHHt6NraojdmbtcGHWni5X4SyixaB1a0eHt87vh+jPbWi21 WoOrcgAThVgMmZbSEBAdpVzsiWTEbp0= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-483-LdCuhWJbOCmZp8ThSKcUaw-1; Fri, 13 Oct 2023 05:46:05 -0400 X-MC-Unique: LdCuhWJbOCmZp8ThSKcUaw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 646F53857B6F for ; Fri, 13 Oct 2023 09:46:05 +0000 (UTC) Received: from dcaratti.users.ipa.redhat.com (unknown [10.45.226.28]) by smtp.corp.redhat.com (Postfix) with ESMTP id F1C67C1EF8 for ; Fri, 13 Oct 2023 09:46:04 +0000 (UTC) From: Davide Caratti To: mptcp@lists.linux.dev Subject: [PATCH mptcp-next] Squash to: "net: mptcp: use policy generated by YAML spec" Date: Fri, 13 Oct 2023 11:45:52 +0200 Message-ID: <36fe14dbd444daf86a22cfa5fb50d590324e7b58.1697190267.git.dcaratti@redhat.com> Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com as per Jakub's review, a newer YAML spec is going to validate addr6 with NLA_POLICY_EXACT_LEN(16) Signed-off-by: Davide Caratti --- net/mptcp/mptcp_pm_gen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mptcp/mptcp_pm_gen.c b/net/mptcp/mptcp_pm_gen.c index 673b5167af6b..a2325e70ddab 100644 --- a/net/mptcp/mptcp_pm_gen.c +++ b/net/mptcp/mptcp_pm_gen.c @@ -15,7 +15,7 @@ const struct nla_policy mptcp_pm_address_nl_policy[MPTCP_PM_ADDR_ATTR_IF_IDX + 1 [MPTCP_PM_ADDR_ATTR_FAMILY] = { .type = NLA_U16, }, [MPTCP_PM_ADDR_ATTR_ID] = { .type = NLA_U8, }, [MPTCP_PM_ADDR_ATTR_ADDR4] = { .type = NLA_U32, }, - [MPTCP_PM_ADDR_ATTR_ADDR6] = { .len = 16, }, + [MPTCP_PM_ADDR_ATTR_ADDR6] = NLA_POLICY_EXACT_LEN(16), [MPTCP_PM_ADDR_ATTR_PORT] = { .type = NLA_U16, }, [MPTCP_PM_ADDR_ATTR_FLAGS] = { .type = NLA_U32, }, [MPTCP_PM_ADDR_ATTR_IF_IDX] = { .type = NLA_S32, },