diff -Nru libnl3-3.4.0/debian/changelog libnl3-3.4.0/debian/changelog --- libnl3-3.4.0/debian/changelog 2018-05-16 16:32:27.000000000 +0800 +++ libnl3-3.4.0/debian/changelog 2022-12-02 22:05:28.000000000 +0800 @@ -1,3 +1,10 @@ +libnl3 (3.4.0-1ubuntu1) focal; urgency=medium + + * Backport one upstream fix to support devices using NLA_F_NESTED + - 7de65a051fb3 (attr: mark nested attributes as NLA_F_NESTED) + + -- Robert Liu Fri, 02 Dec 2022 22:05:28 +0800 + libnl3 (3.4.0-1) unstable; urgency=low * New upstream release (Closes: #880631) diff -Nru libnl3-3.4.0/debian/patches/0001-attr-mark-nested-attributes-as-NLA_F_NESTED.patch libnl3-3.4.0/debian/patches/0001-attr-mark-nested-attributes-as-NLA_F_NESTED.patch --- libnl3-3.4.0/debian/patches/0001-attr-mark-nested-attributes-as-NLA_F_NESTED.patch 1970-01-01 08:00:00.000000000 +0800 +++ libnl3-3.4.0/debian/patches/0001-attr-mark-nested-attributes-as-NLA_F_NESTED.patch 2022-12-02 21:35:39.000000000 +0800 @@ -0,0 +1,34 @@ +From 7de65a051fb37ece16f896a7385073274b77a133 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Wed, 7 Aug 2019 14:53:26 +0200 +Subject: [PATCH] attr: mark nested attributes as NLA_F_NESTED + +Kernel 5.2 is adding stricter checking for netlink messages. +In particular, for certain API it checks now that NLA_F_NESTED flag is +set for nested attributes ([1]). + +Do like libmnl, which always adds this flag ([2]). So we should do +that as well. + +[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b424e432e770d6dd572765459d5b6a96a19c5286 +[2] https://git.netfilter.org/libmnl/tree/src/attr.c?id=5937dfcb0185f5cb9cf275992ea701ec4e619d9c#n535 +--- + lib/attr.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/attr.c b/lib/attr.c +index 1ddc007..a089e99 100644 +--- a/lib/attr.c ++++ b/lib/attr.c +@@ -903,7 +903,7 @@ struct nlattr *nla_nest_start(struct nl_msg *msg, int attrtype) + { + struct nlattr *start = (struct nlattr *) nlmsg_tail(msg->nm_nlh); + +- if (nla_put(msg, attrtype, 0, NULL) < 0) ++ if (nla_put(msg, NLA_F_NESTED | attrtype, 0, NULL) < 0) + return NULL; + + NL_DBG(2, "msg %p: attr <%p> %d: starting nesting\n", +-- +2.34.1 + diff -Nru libnl3-3.4.0/debian/patches/series libnl3-3.4.0/debian/patches/series --- libnl3-3.4.0/debian/patches/series 2017-11-05 06:18:44.000000000 +0800 +++ libnl3-3.4.0/debian/patches/series 2022-12-02 22:02:57.000000000 +0800 @@ -3,3 +3,4 @@ debian/__nl_cache_ops_lookup-unstatic.diff -p1 debian/_nl_socket_generate_local_port_no_release.diff -p1 debian/tca_set_kind.diff -p1 +0001-attr-mark-nested-attributes-as-NLA_F_NESTED.patch -p1