aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2010-10-16 16:15:10 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2010-10-16 16:15:10 +0200
commit4b7d1262d9806e0fcf449436df862369025af2f3 (patch)
tree82ec68fb56affabcc20a59e9413b391adcf927d2
parentb3cabd1f032c88e3027f4bf349e7d90e2ab235a2 (diff)
downloadstrongswan-4b7d1262d9806e0fcf449436df862369025af2f3.tar.bz2
strongswan-4b7d1262d9806e0fcf449436df862369025af2f3.tar.xz
define state_story for STATE_UNDEFINED
-rw-r--r--src/pluto/constants.c5
-rw-r--r--src/pluto/constants.h5
-rw-r--r--src/pluto/demux.c2
-rw-r--r--src/pluto/state.c2
4 files changed, 6 insertions, 8 deletions
diff --git a/src/pluto/constants.c b/src/pluto/constants.c
index 87146c6e0..ec7bfaf78 100644
--- a/src/pluto/constants.c
+++ b/src/pluto/constants.c
@@ -131,6 +131,8 @@ const char *const debug_bit_names[] = {
/* State of exchanges */
static const char *const state_name[] = {
+ "STATE_UNDEFINED",
+
"STATE_MAIN_R0",
"STATE_MAIN_I1",
"STATE_MAIN_R1",
@@ -170,11 +172,12 @@ static const char *const state_name[] = {
};
enum_names state_names =
- { STATE_MAIN_R0, STATE_IKE_ROOF-1, state_name, NULL };
+ { STATE_UNDEFINED, STATE_IKE_ROOF-1, state_name, NULL };
/* story for state */
const char *const state_story[] = {
+ "undefined state after error", /* STATE_UNDEFINED */
"expecting MI1", /* STATE_MAIN_R0 */
"sent MI1, expecting MR1", /* STATE_MAIN_I1 */
"sent MR1, expecting MI2", /* STATE_MAIN_R1 */
diff --git a/src/pluto/constants.h b/src/pluto/constants.h
index 871d68607..075579d6d 100644
--- a/src/pluto/constants.h
+++ b/src/pluto/constants.h
@@ -368,11 +368,6 @@ extern const char *const state_story[];
enum state_kind {
STATE_UNDEFINED, /* 0 -- most likely accident */
- /* Opportunism states: see "Opportunistic Encryption" 2.2 */
-
- OPPO_ACQUIRE, /* got an ACQUIRE message for this pair */
- OPPO_GW_DISCOVERED, /* got TXT specifying gateway */
-
/* IKE states */
STATE_MAIN_R0,
diff --git a/src/pluto/demux.c b/src/pluto/demux.c
index bdd05c5f8..0590a3585 100644
--- a/src/pluto/demux.c
+++ b/src/pluto/demux.c
@@ -2308,7 +2308,7 @@ complete_state_transition(struct msg_digest **mdp, stf_status result)
/* tell whack and log of progress */
{
- const char *story = state_story[st->st_state - STATE_MAIN_R0];
+ const char *story = state_story[st->st_state];
enum rc_type w = RC_NEW_STATE + st->st_state;
char sadetails[128];
diff --git a/src/pluto/state.c b/src/pluto/state.c
index 9c4427569..3639f944d 100644
--- a/src/pluto/state.c
+++ b/src/pluto/state.c
@@ -734,7 +734,7 @@ void fmt_state(bool all, struct state *st, time_t n, char *state_buf,
, st->st_serialno
, c->name, inst
, enum_name(&state_names, st->st_state)
- , state_story[st->st_state - STATE_MAIN_R0]
+ , state_story[st->st_state]
, timer_event_names, st->st_event->ev_type
, delta
, np1, np2, eo, dpd);