From patchwork Mon Oct 16 13:43:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Davide Caratti X-Patchwork-Id: 13423367 X-Patchwork-Delegate: matthieu.baerts@tessares.net Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 D740528680 for ; Mon, 16 Oct 2023 13:43:33 +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="VJ9qYoqH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697463812; 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: in-reply-to:in-reply-to:references:references; bh=mWH5bBtPLsRqkYF2m7QH+8PmhDxvJCZJudFb07XM1Lw=; b=VJ9qYoqHEj7mNnw4fpC2TrJl6GLlvhUgwZJsRodKwwCgNCCWuSEl47deJ73YvIBtnI3PFK Vwd93XaA9eXi1XA/rUdlP7xTo9CAt2LuHIZwPHNIdySw2/zC6Jgyrkd2XpzPleHHXgWsLH Y1iPkrHF6QqZ4B9FvGQH5XdHDwANIsE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-526-LiVFjQ0uMWKlbEq8yCgpPw-1; Mon, 16 Oct 2023 09:43:31 -0400 X-MC-Unique: LiVFjQ0uMWKlbEq8yCgpPw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (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 7170B185A7B6 for ; Mon, 16 Oct 2023 13:43:31 +0000 (UTC) Received: from dcaratti.users.ipa.redhat.com (unknown [10.45.224.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0D888492BFA for ; Mon, 16 Oct 2023 13:43:30 +0000 (UTC) From: Davide Caratti To: mptcp@lists.linux.dev Subject: [PATCH mptcp-next 4/5] Squash to: "net: mptcp: use policy generated by YAML spec" Date: Mon, 16 Oct 2023 15:43:10 +0200 Message-ID: <3271dfdc25950f8edd1d8da8ba4b03bc1b878079.1697463031.git.dcaratti@redhat.com> In-Reply-To: References: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 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, },