From cead8cef16741d206354f2f3d6270568f735a616 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 6 Feb 2019 10:23:07 -0500 Subject: [PATCH] zebra: Add the type we are working on to the rnh data structure Store the type we are working on w/ the rnh data structure. Signed-off-by: Donald Sharp --- zebra/zebra_rnh.c | 1 + zebra/zebra_rnh.h | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index ad8ffda291..fcb6585b35 100644 --- a/zebra/zebra_rnh.c +++ b/zebra/zebra_rnh.c @@ -126,6 +126,7 @@ struct rnh *zebra_add_rnh(struct prefix *p, vrf_id_t vrfid, rnh_type_t type, rnh = XCALLOC(MTYPE_RNH, sizeof(struct rnh)); rnh->client_list = list_new(); rnh->vrf_id = vrfid; + rnh->type = type; rnh->zebra_pseudowire_list = list_new(); route_lock_node(rn); rn->info = rnh; diff --git a/zebra/zebra_rnh.h b/zebra/zebra_rnh.h index 0e71e8a68d..574dcb27be 100644 --- a/zebra/zebra_rnh.h +++ b/zebra/zebra_rnh.h @@ -29,6 +29,8 @@ extern "C" { #endif +typedef enum { RNH_NEXTHOP_TYPE, RNH_IMPORT_CHECK_TYPE } rnh_type_t; + /* Nexthop structure. */ struct rnh { uint8_t flags; @@ -40,6 +42,8 @@ struct rnh { /* VRF identifier. */ vrf_id_t vrf_id; + rnh_type_t type; + struct route_entry *state; struct prefix resolved_route; struct list *client_list; @@ -55,8 +59,6 @@ struct rnh { int filtered[ZEBRA_ROUTE_MAX]; }; -typedef enum { RNH_NEXTHOP_TYPE, RNH_IMPORT_CHECK_TYPE } rnh_type_t; - extern int zebra_rnh_ip_default_route; extern int zebra_rnh_ipv6_default_route; -- 2.39.5