From: Donald Sharp Date: Tue, 19 Sep 2017 17:47:16 +0000 (-0400) Subject: zebra: Allow static routes to track how long they've been around X-Git-Tag: frr-4.0-dev~293^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=d1ca0f1d5b6917b233d84ec9644ff15e33681897;p=matthieu%2Ffrr.git 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 --- 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.