Commit 04506998 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

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

parent b95e0ef4
......@@ -745,6 +745,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