summaryrefslogtreecommitdiff
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2017-05-22 17:44:33 +0200
committerGitHub <noreply@github.com>2017-05-22 17:44:33 +0200
commit1aba7c0944eb798384a27d0a5211c27bd94ffe70 (patch)
treebb00f73181cc09b8d8b05ee7e7e62a88ab6cad79 /zebra/zebra_rib.c
parent0ef0c0505e40c82b2010a8235fb28955bfd68ec7 (diff)
parentcd6a565d4cca2d818e865d7f4ef977560d026b66 (diff)
Merge pull request #581 from donaldsharp/zebra
Zebra
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 12ee9961d5..5f457a6fc5 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -1114,6 +1114,7 @@ rib_install_kernel (struct route_node *rn, struct rib *rib, struct rib *old)
rib_table_info_t *info = srcdest_rnode_table_info(rn);
int recursing;
struct prefix *p, *src_p;
+ struct zebra_vrf *zvrf = vrf_info_lookup (rib->vrf_id);
srcdest_rnode_prefixes (rn, &p, &src_p);
@@ -1130,6 +1131,7 @@ rib_install_kernel (struct route_node *rn, struct rib *rib, struct rib *old)
*/
hook_call(rib_update, rn, "installing in kernel");
ret = kernel_route_rib (p, src_p, old, rib);
+ zvrf->installs++;
/* If install succeeds, update FIB flag for nexthops. */
if (!ret)
@@ -1158,6 +1160,7 @@ rib_uninstall_kernel (struct route_node *rn, struct rib *rib)
rib_table_info_t *info = srcdest_rnode_table_info(rn);
int recursing;
struct prefix *p, *src_p;
+ struct zebra_vrf *zvrf = vrf_info_lookup (rib->vrf_id);
srcdest_rnode_prefixes (rn, &p, &src_p);
@@ -1174,6 +1177,7 @@ rib_uninstall_kernel (struct route_node *rn, struct rib *rib)
*/
hook_call(rib_update, rn, "uninstalling from kernel");
ret = kernel_route_rib (p, src_p, rib, NULL);
+ zvrf->removals++;
for (ALL_NEXTHOPS_RO(rib->nexthop, nexthop, tnexthop, recursing))
UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_FIB);