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);