diff options
Diffstat (limited to 'src/route.c')
-rw-r--r-- | src/route.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/route.c b/src/route.c index 163fb24..64107b2 100644 --- a/src/route.c +++ b/src/route.c @@ -109,7 +109,7 @@ static void maintain_nexthops(gmrf_context_t *ctx, gp_babel_route_t *route) { continue; } - if (gmrf_now(ctx->gmrf) > nexthop->last_update+GP_BABEL_UPDATE_TIMEOUT(nexthop->interval)*10) { + if (gp_babel_since(ctx, nexthop->last_update) > GP_BABEL_UPDATE_TIMEOUT(nexthop->interval)) { if (nexthop->metric_seqno.metric == GP_BABEL_INFINITY) { *cur = *next; next = cur; @@ -126,7 +126,7 @@ static void maintain_nexthops(gmrf_context_t *ctx, gp_babel_route_t *route) { nexthop->last_update += GP_BABEL_UPDATE_TIMEOUT(nexthop->interval)*10; } } - else if (gmrf_now(ctx->gmrf) > nexthop->last_update+GP_BABEL_UPDATE_REQUEST_TIMEOUT(nexthop->interval)*10 && route->selected == nexthop) { + else if (gp_babel_since(ctx, nexthop->last_update) > GP_BABEL_UPDATE_REQUEST_TIMEOUT(nexthop->interval)*10 && route->selected == nexthop) { if (!nexthop->requested_update) { gmrf_logf(ctx->gmrf, LOG_INFO, "route about to expire, requesting update"); gp_babel_send_route_request(ctx, NULL, nexthop->neigh, &route->node); |