diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-03-23 16:36:21 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-03-23 16:36:21 +0100 |
commit | b57074f83ea6163afe2525cd8b372cc8332635d7 (patch) | |
tree | d68035a2eae14c9f90df21a253f9e7900aea182b /src/route.c | |
parent | 5a077ac88402ea4ec5f25211c14f85ad18aa0f2d (diff) | |
download | babel-master.tar babel-master.zip |
Diffstat (limited to 'src/route.c')
-rw-r--r-- | src/route.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/route.c b/src/route.c index fed699c..bffb4c7 100644 --- a/src/route.c +++ b/src/route.c @@ -130,6 +130,8 @@ static gp_babel_metric_seqno_t get_metric(gmrf_context_t *ctx, const gp_babel_ro } static void update_nexthop(gmrf_context_t *ctx, gp_babel_route_t *route) { + bool had_selected = route->selected; + route->selected = select_nexthop(ctx, route); route->metric = get_metric(ctx, route); @@ -139,9 +141,11 @@ static void update_nexthop(gmrf_context_t *ctx, gp_babel_route_t *route) { &route->selected->neigh->addr, route->metric.metric); } else { - gp_babel_send_seqno_request_for(ctx, NULL, route); + if (had_selected) { + gp_babel_send_seqno_request_for(ctx, NULL, route); - gmrf_debug_route_lost(ctx->gmrf, route->node.id, sizeof(gp_babel_node_id_t)); + gmrf_debug_route_lost(ctx->gmrf, route->node.id, sizeof(gp_babel_node_id_t)); + } } /* triggered updates */ |