Commit ed49f408 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Implement retract_neighbour_routes.

parent bd84f8cd
......@@ -513,6 +513,24 @@ consider_route(struct route *route)
return;
}
void
retract_neighbour_routes(struct neighbour *neigh)
{
int i;
i = 0;
while(i < numroutes) {
if(routes[i].neigh == neigh) {
unsigned short oldmetric = routes[i].metric;
if(oldmetric != INFINITY) {
change_route_metric(&routes[i], INFINITY);
route_changed(&routes[i], routes[i].src, oldmetric);
}
}
i++;
}
}
void
send_triggered_update(struct route *route, struct source *oldsrc,
unsigned oldmetric)
......
......@@ -63,6 +63,7 @@ struct route *update_route(const unsigned char *a,
unsigned short seqno, unsigned short refmetric,
struct neighbour *neigh,
const unsigned char *nexthop);
void retract_neighbour_routes(struct neighbour *neigh);
void send_unfeasible_request(struct neighbour *neigh, int force,
unsigned short seqno, unsigned short metric,
const unsigned char *a,
......
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