From 40d86eba41b35ff0c0097b8547ab161ebdf49180 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 10 Jan 2020 15:13:36 -0500 Subject: [PATCH] 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 --- zebra/kernel_netlink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c index c3d5bf8428..90d3aeb482 100644 --- a/zebra/kernel_netlink.c +++ b/zebra/kernel_netlink.c @@ -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; }