]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: add onlink flag to zapi_nh conversion helper
authorStephen Worley <sworley@cumulusnetworks.com>
Mon, 18 May 2020 18:22:06 +0000 (14:22 -0400)
committerStephen Worley <sworley@cumulusnetworks.com>
Mon, 28 Sep 2020 16:40:59 +0000 (12:40 -0400)
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>
lib/zclient.c

index b73dc688fb0df63d075951d5ef275718284bc0d7..cde2f5e05243a6c02062e52dcd0d718d4a111491 100644 (file)
@@ -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 */