Commit 66327e8a authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Implement update_network_metric.

parent 25972bbc
......@@ -320,6 +320,19 @@ update_neighbour_metric(struct neighbour *neigh)
}
}
void
update_network_metric(struct network *net)
{
int i;
i = 0;
while(i < numroutes) {
if(routes[i].neigh->network == net)
update_route_metric(&routes[i]);
i++;
}
}
/* This is called whenever we receive an update. */
struct route *
update_route(const unsigned char *a, const unsigned char *p, unsigned char plen,
......
......@@ -58,6 +58,7 @@ struct route *find_best_route(const unsigned char *prefix, unsigned char plen);
struct route *install_best_route(const unsigned char prefix[16],
unsigned char plen);
void update_neighbour_metric(struct neighbour *neigh);
void update_network_metric(struct network *net);
void update_route_metric(struct route *route);
struct route *update_route(const unsigned char *a,
const unsigned char *p, unsigned char plen,
......
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