summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/route.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/route.c b/src/route.c
index 4daea64..3d54d35 100644
--- a/src/route.c
+++ b/src/route.c
@@ -183,13 +183,16 @@ void gp_babel_route_update(gmrf_context_t *ctx, gp_babel_route_t *route) {
gp_babel_send_seqno_request_for(ctx, NULL, route);
/* triggered updates */
- /*int diff = route->metric.metric - route->last_metric;
+ int diff = route->metric.metric - route->last_metric;
if (((route->last_metric == GP_BABEL_INFINITY) != (route->metric.metric == GP_BABEL_INFINITY))
|| diff <= -1024 || diff >= 384) {
- gmrf_logf(gmrf, LOG_INFO, "route metric has changed significantly, sending updates");
- gp_babel_update_enqueue(&route->node, route->type, route->key, NULL, route->metric.metric == GP_BABEL_INFINITY);
- } */
+ gmrf_logf(ctx->gmrf, LOG_INFO, "route metric has changed significantly, sending updates");
+
+ gmrf_iface_state_t *iface;
+ for (iface = ctx->interfaces; iface; iface = iface->next)
+ gp_babel_send_update_for_route(ctx, iface, NULL, 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) {