[PATCH 27/75] backports: add NLA_POLICY_MIN_LEN()

Hauke Mehrtens <[email protected]> Fri, 28 Jun 2024 01:47:13 +0200
Newsgroups org.kernel.vger.backports
Message-ID <[email protected]>
From: Johannes Berg <[email protected]>

Signed-off-by: Johannes Berg <[email protected]>
---
 backport/backport-include/net/netlink.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/backport/backport-include/net/netlink.h b/backport/backport-include/net/netlink.h
index 7192153b..61c266d5 100644
--- a/backport/backport-include/net/netlink.h
+++ b/backport/backport-include/net/netlink.h
@@ -264,6 +264,8 @@ nla_validate_nested_deprecated(const struct nlattr *start, int maxtype,
 	return __nla_validate_nested(start, maxtype, policy,
 				     NL_VALIDATE_LIBERAL, extack);
 }
+
+#define NLA_POLICY_MIN_LEN(_len)	{ .type = NLA_MIN_LEN, .len = _len }
 #endif /* < 5.2 */
 
 #if LINUX_VERSION_IS_LESS(5,6,0)
-- 
2.45.2