From: Stephen Worley Date: Mon, 18 May 2020 18:22:06 +0000 (-0400) Subject: lib: add onlink flag to zapi_nh conversion helper X-Git-Tag: base_7.6~489^2~37 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=e90284d77f556c1e94be2d8978b5ebb184b1e93b;p=matthieu%2Ffrr.git 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 --- 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 */