diff options
author | Tobias Brunner <tobias@strongswan.org> | 2014-07-22 10:57:57 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2014-07-22 11:06:31 +0200 |
commit | 32109a535f3f0ae3e234ebfefc7c69dfc2327c67 (patch) | |
tree | 062cf0f8ce177a4f062bc8b70ccb2ea263fb13d8 /src/frontends/android/jni/libandroidbridge/backend/android_service.c | |
parent | 94124456f2241f15ab9211a7ce65c1b56b25fe54 (diff) | |
parent | 394be2d5563eedf284984f8180e51353af45a621 (diff) | |
download | strongswan-32109a535f3f0ae3e234ebfefc7c69dfc2327c67.tar.bz2 strongswan-32109a535f3f0ae3e234ebfefc7c69dfc2327c67.tar.xz |
Merge branch 'android-state-updates'
The GUI reflects the state of the IKE daemon more closely by switching
back to the "connecting" state when the IKE_SA or CHILD_SA is down and
is getting reestablished.
Fixes #616.
Diffstat (limited to 'src/frontends/android/jni/libandroidbridge/backend/android_service.c')
-rw-r--r-- | src/frontends/android/jni/libandroidbridge/backend/android_service.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/frontends/android/jni/libandroidbridge/backend/android_service.c b/src/frontends/android/jni/libandroidbridge/backend/android_service.c index db9bebcc5..d73dc4582 100644 --- a/src/frontends/android/jni/libandroidbridge/backend/android_service.c +++ b/src/frontends/android/jni/libandroidbridge/backend/android_service.c @@ -381,14 +381,8 @@ METHOD(listener_t, child_updown, bool, } else { - if (ike_sa->has_condition(ike_sa, COND_REAUTHENTICATING)) - { /* we ignore this during reauthentication */ - return TRUE; - } - close_tun_device(this); charonservice->update_status(charonservice, CHARONSERVICE_CHILD_STATE_DOWN); - return FALSE; } } return TRUE; @@ -398,7 +392,8 @@ METHOD(listener_t, ike_updown, bool, private_android_service_t *this, ike_sa_t *ike_sa, bool up) { /* this callback is only registered during initiation, so if the IKE_SA - * goes down we assume an authentication error */ + * goes down we assume some kind of authentication error, more specific + * errors are catched in the alert() handler */ if (this->ike_sa == ike_sa && !up) { charonservice->update_status(charonservice, @@ -458,6 +453,11 @@ METHOD(listener_t, ike_reestablish, bool, this->ike_sa = new; /* re-register hook to detect initiation failures */ this->public.listener.ike_updown = _ike_updown; + /* if the IKE_SA got deleted by the responder we get the child_down() + * event on the old IKE_SA after this hook has been called, so they + * get ignored and thus we trigger the event here */ + charonservice->update_status(charonservice, + CHARONSERVICE_CHILD_STATE_DOWN); /* the TUN device will be closed when the new CHILD_SA is established */ } return TRUE; |