android: Ignore if peer is unreachable when reestablishing an SA

This commit is contained in:
Tobias Brunner
2012-10-18 12:25:59 +02:00
parent 901f6ac403
commit 2b6088c718
@@ -414,8 +414,13 @@ METHOD(listener_t, alert, bool,
CHARONSERVICE_PEER_AUTH_ERROR);
break;
case ALERT_PEER_INIT_UNREACHABLE:
charonservice->update_status(charonservice,
CHARONSERVICE_UNREACHABLE_ERROR);
this->lock->read_lock(this->lock);
if (this->tunfd < 0)
{ /* only handle this if we are not reestablishing the SA */
charonservice->update_status(charonservice,
CHARONSERVICE_UNREACHABLE_ERROR);
}
this->lock->unlock(this->lock);
break;
default:
break;