]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
libnetlink: Set NLA_F_NESTED in rta_nest
authorDavid Ahern <dsahern@gmail.com>
Fri, 7 Jun 2019 22:38:07 +0000 (15:38 -0700)
committerDavid Ahern <dsahern@gmail.com>
Tue, 11 Jun 2019 17:30:39 +0000 (10:30 -0700)
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

index 0d48a3d43cf03065dacbd419578ab10af56431a4..6ae51a9dba14e11de95237e0a8dd16e6dbe4074a 100644 (file)
@@ -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;
 }