Make datagram SPTPS key exchange more robust.

Similar to old style key exchange requests, keep track of whether a key
exchange is already in progress and how long it took. If no key is known yet
or if key exchange takes too long, (re)start a new key exchange.
This commit is contained in:
Guus Sliepen 2012-10-07 13:31:19 +02:00
parent b99af2f813
commit bb6b97ce34
4 changed files with 47 additions and 29 deletions

View file

@ -234,6 +234,10 @@ static void check_reachability(void) {
/* TODO: only clear status.validkey if node is unreachable? */
n->status.validkey = false;
if(n->status.sptps) {
sptps_stop(&n->sptps);
n->status.waitingforkey = false;
}
n->last_req_key = 0;
n->maxmtu = MTU;