diff mbox series

[v2,iproute-next,01/10] libnetlink: Set NLA_F_NESTED in rta_nest

Message ID 20190607223816.27512-2-dsahern@kernel.org
State Accepted
Delegated to: David Ahern
Headers show
Series ip: Add support for nexthop objects | expand

Commit Message

David Ahern June 7, 2019, 10:38 p.m. UTC
From: David Ahern <dsahern@gmail.com>

Kernel now requires NLA_F_NESTED to be set on new nested
attributes. Set NLA_F_NESTED in rta_nest.

Signed-off-by: David Ahern <dsahern@gmail.com>
---
 lib/libnetlink.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/lib/libnetlink.c b/lib/libnetlink.c
index 0d48a3d43cf0..6ae51a9dba14 100644
--- a/lib/libnetlink.c
+++ b/lib/libnetlink.c
@@ -1336,6 +1336,7 @@  struct rtattr *rta_nest(struct rtattr *rta, int maxlen, int type)
 	struct rtattr *nest = RTA_TAIL(rta);
 
 	rta_addattr_l(rta, maxlen, type, NULL, 0);
+	nest->rta_type |= NLA_F_NESTED;
 
 	return nest;
 }