Commit c4622f61 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Update a route's channel list when receiving an update.

This was causing the channel list to remain stuck at the old value
when we were rerouting.
parent 7fae11e7
......@@ -825,6 +825,12 @@ update_route(const unsigned char *id,
if((feasible || keep_unfeasible) && refmetric < INFINITY)
route->time = now.tv_sec;
route->seqno = seqno;
memset(&route->channels, 0, sizeof(route->channels));
if(channels_len > 0)
memcpy(&route->channels, channels,
MIN(channels_len, DIVERSITY_HOPS));
change_route_metric(route,
refmetric, neighbour_cost(neigh), add_metric);
route->hold_time = hold_time;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment