Re: [Hipsec] Completing 5201 state machine

Miika Komu <mkomu@cs.hut.fi> Tue, 19 October 2010 08:58 UTC

Return-Path: <mkomu@cs.hut.fi>
X-Original-To: hipsec@core3.amsl.com
Delivered-To: hipsec@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 51C743A6A65 for <hipsec@core3.amsl.com>; Tue, 19 Oct 2010 01:58:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.193
X-Spam-Level:
X-Spam-Status: No, score=-6.193 tagged_above=-999 required=5 tests=[AWL=0.406, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aNVH5+uGImCs for <hipsec@core3.amsl.com>; Tue, 19 Oct 2010 01:58:12 -0700 (PDT)
Received: from mail.cs.hut.fi (mail.cs.hut.fi [130.233.192.7]) by core3.amsl.com (Postfix) with ESMTP id EA0743A694F for <hipsec@ietf.org>; Tue, 19 Oct 2010 01:58:11 -0700 (PDT)
Received: from hutcs.cs.hut.fi ([130.233.192.10] helo=[127.0.0.1]) by mail.cs.hut.fi with esmtp (Exim 4.54) id 1P882m-0006m0-Lm for hipsec@ietf.org; Tue, 19 Oct 2010 11:59:40 +0300
Message-ID: <4CBD5E83.9090908@cs.hut.fi>
Date: Tue, 19 Oct 2010 12:01:55 +0300
From: Miika Komu <mkomu@cs.hut.fi>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8
MIME-Version: 1.0
To: hip WG <hipsec@ietf.org>
References: <917A9DF6-17C4-4AAF-9132-1A865D0A824B@cs.rwth-aachen.de> <7CC566635CFE364D87DC5803D4712A6C4CEC451A09@XCH-NW-10V.nw.nos.boeing.com>
In-Reply-To: <7CC566635CFE364D87DC5803D4712A6C4CEC451A09@XCH-NW-10V.nw.nos.boeing.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Subject: Re: [Hipsec] Completing 5201 state machine
X-BeenThere: hipsec@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: "This is the official IETF Mailing List for the HIP Working Group." <hipsec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/hipsec>, <mailto:hipsec-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hipsec>
List-Post: <mailto:hipsec@ietf.org>
List-Help: <mailto:hipsec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hipsec>, <mailto:hipsec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Oct 2010 08:58:13 -0000

Hi,

On 19/10/10 02:41, Henderson, Thomas R wrote:
> Tobias, I reviewed the OpenHIP behavior to these white spots, below:
>
>> -----Original Message-----
>> From: hipsec-bounces@ietf.org
>> [mailto:hipsec-bounces@ietf.org] On Behalf Of Tobias Heer
>> Sent: Wednesday, October 13, 2010 9:13 AM
>> To: HIP WG
>> Subject: [Hipsec] Completing 5201 state machine
>>
>> Hello,
>>
>> the state machine of RFC5201 (not -bis) has some white spots
>> which I try to cover now. Nothing essential is missing but it
>> seems slightly underspecified the way it is now.
>> Handling of the following packets is missing in some states:
>> CLOSE, CLOSE_ACK, and NOTIFY. And it is not caught by the
>> "handle ANYOTHER" rules that serve as catch-all.
>>
>> I'll list the changes that I'll make here and ask for
>> feedback from the group and especially implementors.
>>
>> 1.) Receive CLOSE in state I2-sent:
>> ------------------------------
>> Why can this happen?
>> - R2 is lost (maybe repeatedly), Responder transitions to
>> from R2-SENT to ESTABLISHED because of timeout, Responder
>> decides to close association (because of some reason)
>>
>> Proposed action: process packet
>> - successful: transition to CLOSING
>> - fail: drop and stay at I2-sent
>
> OpenHIP allows CLOSE in states ESTABLISHED, CLOSING, CLOSED, and R2_SENT, but does not process it in this state.
>
> Can you clarify what you want to happen here?  Usually, if peer sends a CLOSE, you send CLOSE_ACK and transition to CLOSED, not to CLOSING.

HIPL also ignores this, i.e., drops the CLOSE packet.

>> 2.) Receive CLOSE in state R2-sent
>> ------------------------------
>> Why can this happen?
>> - Responder cannot observe data packet flow (this is the case
>> for some implementations), Responder timeout for transition
>> from R2-SENT to ESTABLISHED has not fired yet, Initiator
>> decides to close association (because of some reason)
>>
>> Proposed action: process packet
>> - successful: transition to CLOSING
>> - fail: drop and stay at R2-sent
>
> OpenHIP accepts this packet, sends CLOSE_ACK, and transitions to CLOSED.  As in 1) above, are you suggesting state CLOSING or CLOSED?

HIPL currently ignores this, but I think it might be a good idea to 
process this.

>>
>> 3.) Receive CLOSE_ACK in state R2-sent
>> ------------------------------
>> Why can this happen?
>> - It shouldn't but there is nothing specified.
>>
>> Proposed action: drop
>
> Agree; in OpenHIP, CLOSE_ACK is only processed in state CLOSING or CLOSED.

Agred. Dropped by HIPL too.

>> 4.) Receive NOTIFY in state R2-sent
>> ------------------------------
>> Why can this happen?
>> - Responder cannot observe the data channel and timeout has
>> not fired yet.
>>
>> Proposed action: process and stay in R2 sent
>
> Agree; in OpenHIP, NOTIFY is processed in any state that has a valid association

Agree (processed and logged by HIPL).

>> 5.) Receive CLOSE_ACK in state ESTABLISHED
>> ------------------------------
>> Why can this happen?
>> - It shouldn't but there is nothing specified.
>>
>> Proposed action: drop
>
> Agree; see 3) above.

Agree (dropped by HIPL).

>>
>>
>> 6. Receive NOTIFY in state ESTABLISHED
>> ------------------------------
>> Why can this happen?
>> - Well, there are many reasons for this. This is normal behavior.
>>
>> Proposed action: process and stay in ESTABLISHED
>
> Agree.

Agree (processed and logged by HIPL).