summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-03-23 16:36:21 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-03-23 16:36:21 +0100
commitb57074f83ea6163afe2525cd8b372cc8332635d7 (patch)
treed68035a2eae14c9f90df21a253f9e7900aea182b /src
parent5a077ac88402ea4ec5f25211c14f85ad18aa0f2d (diff)
downloadbabel-b57074f83ea6163afe2525cd8b372cc8332635d7.tar
babel-b57074f83ea6163afe2525cd8b372cc8332635d7.zip
Don't handle "lost" routes when the route didn't have a selected nexthop beforeHEADmaster
Diffstat (limited to 'src')
-rw-r--r--src/route.c8
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 */