From: Tobias Brunner Date: Tue, 16 Oct 2012 11:41:02 +0000 (+0200) Subject: android: Ignore if peer is unreachable when reestablishing an SA X-Git-Tag: 5.0.2dr4~351^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2b6088c7187f30479ef20d305e1972abe3d5a40a;p=thirdparty%2Fstrongswan.git android: Ignore if peer is unreachable when reestablishing an SA --- diff --git a/src/frontends/android/jni/libandroidbridge/backend/android_service.c b/src/frontends/android/jni/libandroidbridge/backend/android_service.c index d451a3d942..b00567f608 100644 --- a/src/frontends/android/jni/libandroidbridge/backend/android_service.c +++ b/src/frontends/android/jni/libandroidbridge/backend/android_service.c @@ -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;