From e90284d77f556c1e94be2d8978b5ebb184b1e93b Mon Sep 17 00:00:00 2001 From: Stephen Worley Date: Mon, 18 May 2020 14:22:06 -0400 Subject: [PATCH] lib: add onlink flag to zapi_nh conversion helper Add setting the onlink flag to the zapi_nh conversion helper function so that we can set the onlink flag with it when passing down NHGs from upper level protos. Signed-off-by: Stephen Worley --- lib/zclient.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/zclient.c b/lib/zclient.c index b73dc688fb..cde2f5e052 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -1649,6 +1649,9 @@ int zapi_nexthop_from_nexthop(struct zapi_nexthop *znh, znh->ifindex = nh->ifindex; znh->gate = nh->gate; + if (CHECK_FLAG(nh->flags, NEXTHOP_FLAG_ONLINK)) + SET_FLAG(znh->flags, ZAPI_NEXTHOP_FLAG_ONLINK); + if (nh->nh_label && (nh->nh_label->num_labels > 0)) { /* Validate */ -- 2.39.5