diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-07-16 14:01:17 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-07-16 14:01:17 +0200 |
commit | 0ed857ab63fee474225b2d218df5816f62a076c0 (patch) | |
tree | fe45926e374af7b523611381b23bd8b1c345e6a6 /staticd | |
parent | staticd: Setup nexthop tracking instead of installing route (diff) | |
download | frr-0ed857ab63fee474225b2d218df5816f62a076c0.tar.xz frr-0ed857ab63fee474225b2d218df5816f62a076c0.zip |
static: Start state tracking to know what we think the route is doing
We need to track the state information in staticd of what we think
the route is. Add the enum for this state and place it into
the si.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'staticd')
-rw-r--r-- | staticd/static_routes.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/staticd/static_routes.h b/staticd/static_routes.h index 6036bfe39..6414947b1 100644 --- a/staticd/static_routes.h +++ b/staticd/static_routes.h @@ -44,6 +44,26 @@ typedef enum { STATIC_IPV6_GATEWAY_IFNAME, } static_types; +/* + * Route Creation gives us: + * START -> Initial State, only exit is when we send the route to + * zebra for installation + * When we send the route to Zebra move to SENT_TO_ZEBRA + * SENT_TO_ZEBRA -> A way to notice that we've sent the route to zebra + * But have not received a response on it's status yet + * After The response from zebra we move to INSTALLED or FAILED + * INSTALLED -> Route was accepted + * FAILED -> Route was rejected + * When we receive notification about a nexthop that a route uses + * We move the route back to START and initiate the process again. + */ +enum static_install_states { + STATIC_START, + STATIC_SENT_TO_ZEBRA, + STATIC_INSTALLED, + STATIC_NOT_INSTALLED, +}; + /* Static route information. */ struct static_route { /* For linked list. */ @@ -55,6 +75,12 @@ struct static_route { vrf_id_t nh_vrf_id; char nh_vrfname[VRF_NAMSIZ + 1]; + /* + * States that we walk the route through + * To know where we are. + */ + enum static_install_states state; + /* Administrative distance. */ uint8_t distance; |