diff options
| author | Thomas Haller <thaller@redhat.com> | 2019-08-07 14:53:26 +0200 |
|---|---|---|
| committer | Elliott Hughes <enh@google.com> | 2020-03-10 14:45:42 -0700 |
| commit | 8bdf14986a1baee1d44724cc66bc24c55418ebf5 (patch) | |
| tree | 82b7b4803c95496ac081c3cd4c4504698f017564 | |
| parent | 173d924eceaa33fe7f731dfc692dd1e1cace80f3 (diff) | |
| download | platform_external_libnl-android11-dev.tar.gz platform_external_libnl-android11-dev.tar.bz2 platform_external_libnl-android11-dev.zip | |
attr: mark nested attributes as NLA_F_NESTEDandroid11-dev
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
Bug: https://issuetracker.google.com/150744338
Test: treehugger
Change-Id: I9012d820ed72b13d4562e144c48bc7003d621f09
| -rw-r--r-- | lib/attr.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -796,7 +796,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", |
