[Swan-dev] state m/c 2of3: State machine cleanups
Andrew Cagney
andrew.cagney at gmail.com
Wed Mar 4 02:47:45 EET 2015
On 3 March 2015 at 14:06, Paul Wouters <paul at nohats.ca> wrote:
> On Tue, 3 Mar 2015, Andrew Cagney wrote:
>
>>>> - cleans up IKE_I and MSG_R along with md->role and st->st_role (new).
>>>
>>>
>>> Could one state object be in two different roles? Like when it sent a
>>> delete notify and receiving a DPD/liveness probe?
>>
>>
>> No. But there is MSG_R.
>>
>> "role" is the original role as in the original INITIATOR or RESPONDER.
>
>
> Perhaps st_o_init or st_orig_i is a better name than? role will (again)
> get confused up between "original initiator" and "message responder"
> roles.
The enum is:
enum phase1_role {
O_INITIATOR=1,
O_RESPONDER=2
};
so st->st_o_role (and a renamed) md->o_role wouldn't be out of place.
My preference is actually for st_original_role / md->original_role. I
chose st_role to match md->role.
>> It can never change. And md-role had better match st->st_role; if it
>> doesn't we should back away from the payload slowly :-).
>
>
> Right. I was confusing it with the message exchange role. Role is a bad
> name!
>
> Paul
More information about the Swan-dev
mailing list