summaryrefslogtreecommitdiff
path: root/ripd/ripd.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-01-04 19:08:10 -0200
committerRenato Westphal <renato@opensourcerouting.org>2019-01-18 16:15:41 -0200
commitc08a21077faa595a76f87cc4b67d76623f045e0f (patch)
tree59bd6b3dd713f05e72e44478bb0426b5b061bd29 /ripd/ripd.c
parent241987a816b8a2bb1d2973f33624fdea62718208 (diff)
ripd: move global counters to the rip structure
The only sideeffect of this change is that these counters will be reset when RIP is deconfigured and then configured again, but this shouldn't be a problem as the RIP MIB isn't specific about this. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ripd/ripd.c')
-rw-r--r--ripd/ripd.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/ripd/ripd.c b/ripd/ripd.c
index 35ad4d818a..1e92fedb63 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -53,12 +53,6 @@
/* RIP Structure. */
struct rip *rip = NULL;
-/* RIP route changes. */
-long rip_global_route_changes = 0;
-
-/* RIP queries. */
-long rip_global_queries = 0;
-
/* Prototypes. */
static void rip_output_process(struct connected *, struct sockaddr_in *, int,
uint8_t);
@@ -1633,7 +1627,7 @@ static void rip_request_process(struct rip_packet *packet, int size,
(void)rip_send_packet((uint8_t *)packet, size, from, ifc);
}
- rip_global_queries++;
+ rip->counters.queries++;
}
/* First entry point of RIP packet. */