]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Add the type we are working on to the rnh data structure
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 6 Feb 2019 15:23:07 +0000 (10:23 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 27 Mar 2019 20:19:28 +0000 (16:19 -0400)
Store the type we are working on w/ the rnh data structure.

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

index ad8ffda2913fc8794037ee844426ac746cf6e632..fcb6585b3546e28cf6be71e8cde9f4c66d659ab1 100644 (file)
@@ -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;
index 0e71e8a68da36eec9c8b4da4062365a504f2eab2..574dcb27bed7546295ccef401f926666f278609d 100644 (file)
@@ -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;