Send triggered updates
This commit is contained in:
parent
4b79b85e4e
commit
ef586cf976
1 changed files with 7 additions and 4 deletions
11
src/route.c
11
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);
|
gp_babel_send_seqno_request_for(ctx, NULL, route);
|
||||||
|
|
||||||
/* triggered updates */
|
/* 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))
|
if (((route->last_metric == GP_BABEL_INFINITY) != (route->metric.metric == GP_BABEL_INFINITY))
|
||||||
|| diff <= -1024 || diff >= 384) {
|
|| diff <= -1024 || diff >= 384) {
|
||||||
gmrf_logf(gmrf, LOG_INFO, "route metric has changed significantly, sending updates");
|
gmrf_logf(ctx->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_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) {
|
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) {
|
||||||
|
|
Reference in a new issue