summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2020-05-18 14:22:06 -0400
committerStephen Worley <sworley@cumulusnetworks.com>2020-09-28 12:40:59 -0400
commite90284d77f556c1e94be2d8978b5ebb184b1e93b (patch)
tree7daeb886eba92de4d8fe02d5c39163d2e2f1992c
parent2b5ecd4ca6b5fb63cd3e2b82c647350a5259a42a (diff)
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 <sworley@cumulusnetworks.com>
-rw-r--r--lib/zclient.c3
1 files changed, 3 insertions, 0 deletions
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 */