libnetlink: Set NLA_F_NESTED in rta_nest

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>
This commit is contained in:
David Ahern 2019-06-07 15:38:07 -07:00
parent 9a4f0ba478
commit 2360b8cb21
1 changed files with 1 additions and 0 deletions

View File

@ -1336,6 +1336,7 @@ struct rtattr *rta_nest(struct rtattr *rta, int maxlen, int type)
struct rtattr *nest = RTA_TAIL(rta); struct rtattr *nest = RTA_TAIL(rta);
rta_addattr_l(rta, maxlen, type, NULL, 0); rta_addattr_l(rta, maxlen, type, NULL, 0);
nest->rta_type |= NLA_F_NESTED;
return nest; return nest;
} }