Commit 19ab0c6c authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Reject unfeasible updates earlier.

parent 748379ff
......@@ -301,10 +301,6 @@ update_route(const unsigned char *d, int seqno, int refmetric,
if(dest == NULL)
return NULL;
metric = MIN(refmetric + neighbour_cost(nexthop), INFINITY);
route = find_route(d, nexthop);
if(!update_feasible(seqno, refmetric, dest)) {
debugf("Rejecting unfeasible update from %s.\n",
format_address(nexthop->address));
......@@ -313,6 +309,10 @@ update_route(const unsigned char *d, int seqno, int refmetric,
return NULL;
}
metric = MIN(refmetric + neighbour_cost(nexthop), INFINITY);
route = find_route(d, nexthop);
if(route) {
int oldseqno;
int oldmetric;
......
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