cjdelisle/cjdns — pull request #696 by Arceliar (2014-11-19 16:32:15+00:00)
Title: Workaround for a remaining source of blackholes.

Two things:
1) Minor changes to reach calculation and node adoption from pathResponse, to (hopefully) make path choice a little more stable. E.g. if wifi randomly drops a single ping, that should be less likely to make a route flap around.
2) If we ping link->child repeatedly until reach gets to 0, break the link to it. If link->child is in a bad state, this should prevent us from re-adopting the next time link->parent responds. Eventually this should break all the links to link->child and it will go away. There's a chance that we could remove a valid link by mistake (e.g. link->child is fine, and someone before link->child in the path is broken and not returning errors). When that happens, we should re-discover link upon re-establishing contact with link->child (i.e. we switch to another path until we get one that routes around the bad link, we getPeers link->child, and then re-discover any links that we incorrectly broke).