]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: Allow static routes to track how long they've been around
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 19 Sep 2017 17:47:16 +0000 (13:47 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 19 Sep 2017 17:47:16 +0000 (13:47 -0400)
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 <sharpd@cumulusnetworks.com>
zebra/zebra_static.c

index 836a2aa6a572e04a439fec1babbe456b857939a6..5927ba9d750e5146eec12125b3f308f55dc4b40d 100644 (file)
@@ -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.