zebra: Actually add the NLA_F_NESTED flag to our code

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>
This commit is contained in:
Donald Sharp 2020-01-10 15:13:36 -05:00
parent abb5d7a933
commit 40d86eba41

View 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;
}