]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Carry onlink if set from resolving nexthop 3289/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 7 Nov 2018 16:26:24 +0000 (11:26 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 7 Nov 2018 16:28:01 +0000 (11:28 -0500)
When resolving a nexthop, carry the onlink flag if it
is set to the new nexthop.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/zebra_rib.c

index d55467c727f30f5a9704d28f9ede8e5d43bf7e02..828539252732166570af5970fd31135c58a703db 100644 (file)
@@ -358,8 +358,6 @@ static void nexthop_set_resolved(afi_t afi, const struct nexthop *newhop,
                if (newhop->ifindex) {
                        resolved_hop->type = NEXTHOP_TYPE_IPV4_IFINDEX;
                        resolved_hop->ifindex = newhop->ifindex;
-                       if (newhop->flags & NEXTHOP_FLAG_ONLINK)
-                               resolved_hop->flags |= NEXTHOP_FLAG_ONLINK;
                }
                break;
        case NEXTHOP_TYPE_IPV6:
@@ -398,6 +396,9 @@ static void nexthop_set_resolved(afi_t afi, const struct nexthop *newhop,
                break;
        }
 
+       if (newhop->flags & NEXTHOP_FLAG_ONLINK)
+               resolved_hop->flags |= NEXTHOP_FLAG_ONLINK;
+
        /* Copy labels of the resolved route */
        if (newhop->nh_label)
                nexthop_add_labels(resolved_hop, newhop->nh_label_type,