From d1ca0f1d5b6917b233d84ec9644ff15e33681897 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 19 Sep 2017 13:47:16 -0400 Subject: [PATCH] zebra: Allow static routes to track how long they've been around Static routes were not keeping track of uptime appopriately and as such we were not properly displaying uptime. Fixes: #1196 Signed-off-by: Donald Sharp --- zebra/zebra_static.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zebra/zebra_static.c b/zebra/zebra_static.c index 836a2aa6a5..5927ba9d75 100644 --- a/zebra/zebra_static.c +++ b/zebra/zebra_static.c @@ -135,6 +135,8 @@ void static_install_route(afi_t afi, safi_t safi, struct prefix *p, re->type); } } + + re->uptime = time(NULL); /* Schedule route for processing or invoke NHT, as appropriate. */ if (si->type == STATIC_IPV4_GATEWAY @@ -211,6 +213,7 @@ void static_install_route(afi_t afi, safi_t safi, struct prefix *p, re->type); } } + re->uptime = time(NULL); /* Link this re to the tree. Schedule for processing or invoke * NHT, * as appropriate. -- 2.39.5