summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-08-03 17:25:02 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-08-03 17:25:02 +0200
commit1d092504e40733409ade4cc98718426b58b995bb (patch)
tree91d543c72a7aa960385bbc67991be265b42b4bf1
parent43ff1c3ed59cdb88c1232ac581d649a7db87337e (diff)
downloadbabel-1d092504e40733409ade4cc98718426b58b995bb.tar
babel-1d092504e40733409ade4cc98718426b58b995bb.zip
Update nexthop last update time when the first retract has been received
-rw-r--r--src/route.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/route.c b/src/route.c
index 64107b2..a646b03 100644
--- a/src/route.c
+++ b/src/route.c
@@ -190,12 +190,12 @@ void gp_babel_route_update(gmrf_context_t *ctx, gp_babel_route_t *route) {
}
void gp_babel_route_update_nexthop(gmrf_context_t *ctx, gp_babel_route_t *route, gp_babel_nexthop_t *nexthop, gp_babel_metric_seqno_t ms, uint16_t interval) {
+ if (ms.metric != GP_BABEL_INFINITY || nexthop->metric_seqno.metric != GP_BABEL_INFINITY)
+ nexthop->last_update = gmrf_now(ctx->gmrf);
+
nexthop->metric_seqno = ms;
nexthop->interval = interval;
nexthop->requested_update = false;
- if (ms.metric != GP_BABEL_INFINITY)
- nexthop->last_update = gmrf_now(ctx->gmrf);
-
gp_babel_route_update(ctx, route);
}