]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Give installed nhe's the zebra proto
authorStephen Worley <sworley@cumulusnetworks.com>
Thu, 25 Jul 2019 18:00:31 +0000 (14:00 -0400)
committerStephen Worley <sworley@cumulusnetworks.com>
Fri, 25 Oct 2019 15:13:41 +0000 (11:13 -0400)
Give all nhg_hash_entrys we install into the kernel
as nexthop objects a defined proto matching the zebra
rib table one. This makes sense since nhe's are proto-independent
and determined exclusively in zebra.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
zebra/rt_netlink.c
zebra/zebra_dplane.c
zebra/zebra_nhg.c

index 89fed59f7614555e4efe65c043b7779b6b0a2031..c6f15aef2a653cf211750750c4b646f15cab3e01 100644 (file)
@@ -188,6 +188,7 @@ static inline int zebra2proto(int proto)
                proto = RTPROT_OPENFABRIC;
                break;
        case ZEBRA_ROUTE_TABLE:
+       case ZEBRA_NHG:
                proto = RTPROT_ZEBRA;
                break;
        default:
index e4002252d3a173bf0478d17ebd98ccbdf8ecd69e..0e89ba3a27cd127ff5f308a32f6eab117979f98c 100644 (file)
@@ -1577,6 +1577,7 @@ static int dplane_ctx_nexthop_init(struct zebra_dplane_ctx *ctx,
 
        ctx->zd_op = op;
        ctx->zd_status = ZEBRA_DPLANE_REQUEST_SUCCESS;
+       ctx->u.rinfo.zd_type = ZEBRA_ROUTE_TABLE;
 
        /* Copy over nhe info */
        ctx->u.rinfo.nhe.id = nhe->id;
index 870f4afb2786305386ff485ec661c7b2df486de8..3589c0e7b78f61296f33554b781b3cab2ea3fe20 100644 (file)
@@ -1388,7 +1388,6 @@ int nexthop_active_update(struct route_node *rn, struct route_entry *re)
 
        if (CHECK_FLAG(re->status, ROUTE_ENTRY_CHANGED)) {
                struct nhg_hash_entry *new_nhe = NULL;
-               // TODO: Add proto type here
 
                new_nhe = zebra_nhg_rib_find(0, &new_grp, rt_afi);