Commit Graph

58 Commits

Author SHA1 Message Date
Donald Sharp
74f0a94efd staticd: refcount the nht add/removal
When we add / remove a nexthop that we need to track,
keep track of the number of times we have done this
for each nexthop.  Consequently keep track of the
number of available nexthops, so that we can
just install new routes when we get one
that uses a pre-existing nexthop.  Deletion of
nexthops is done on refcount going to 0.
Removal of routes is handled elsewhere for removal.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-25 08:11:01 -04:00
Philippe Guibert
7a2c24df02 static: remove useless debug variable
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-08-22 10:04:49 +02:00
Philippe Guibert
31d4a8e5f0 staticd: do not forget to set table id marker on zebra message
Table identifier is not read if table id marker is not set.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-08-22 10:04:06 +02:00
Emanuele Di Pascale
bacd8eea47 staticd: Fix null pointer access (coverity 1472311)
Aded a check to ensure that if_is_vrf() is not called on a NULL if pointer.
Incidentally this was causing PR #2805 to fail.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2018-08-09 14:26:55 +02:00
Donald Sharp
8bc8de2c15 staticd: Allow daemon to have backup static routes
Modify staticd to allow it to have backup static routes
with higher admin distance.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-29 12:43:23 -04:00
Donald Sharp
8d5cbee91d staticd: Code review comments fixes
1) Conform staticd to proper gnu gpl file format.
2) Fix a spelling mistake found.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-29 12:43:23 -04:00
Donald Sharp
88a9001659 staticd: Fix recursive routes for certain types of nexthops
Existing NEXTHOP_TYPE_IPV4_IFINDEX and NEXTHOP_TYPE_IPV6_IFINDEX
routes allow recursion, but were broken when the route happened
to recursively resolve and the resolution nexthop changed.

This commit fixes this issue.  Please note that this issue was
in pre-move of static route handling to it's own daemon as well.
This was some easy low-hanging fruit, so to speak.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-29 12:37:26 -04:00
Donald Sharp
7e24fdf333 staticd: Start the addition of a staticd
This is the start of separating out the static
handling code from zebra -> staticd.  This will
help simplify the zebra code and isolate static
route handling to it's own code base.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-29 12:37:24 -04:00