]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Actually add the NLA_F_NESTED flag to our code 5663/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 10 Jan 2020 20:13:36 +0000 (15:13 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 10 Jan 2020 20:13:36 +0000 (15:13 -0500)
The existing usage of the rta_nest and addattr_nest
functions were not adding the NLA_F_NESTED flag
to the type.  As such the new nexthop functionality was
actually looking for this flag, while apparently older
code did not.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/kernel_netlink.c

index c3d5bf84282101087178a3a0e6d442b22f175eb6..90d3aeb482d9c4fe8b912380acf911b916c7ed10 100644 (file)
@@ -592,6 +592,7 @@ struct rtattr *addattr_nest(struct nlmsghdr *n, int maxlen, int type)
        struct rtattr *nest = NLMSG_TAIL(n);
 
        addattr_l(n, maxlen, type, NULL, 0);
+       nest->rta_type |= NLA_F_NESTED;
        return nest;
 }
 
@@ -606,6 +607,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;
 }