diff options
-rw-r--r-- | src/route.c | 6 |
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); } |