Subject: Re: [NSIS] NATFW state machine draft

From: Niklas Steinleitner <[email-masked]>
Date: Sun, 25 Jun 2006 22:12:15 +0200

Hi Matthias,

sorry for my late response, i before overlook your mail and notice it 
when preparing an update for the statemachine draft.
Thanks for your deep review and helpful comments, please find my 
comments inline.

Matthias Friedrich wrote:

>Hi,
>
>I've got a few questions about version 02 of the NATFW state machine
>draft.
>
> * Section 7 ("State machines for the NAT/FW NF"), state IDLE:
>   What's the tx_CREATE in the last action good for?
>  
>
For "Proxying for a Data Sender", see section 3.8.7.1 in the NAT/FW NSLP 
draft.

> * Section 7 ("State machines for the NAT/FW NF"), state NONEDGE_REA:
>   Is there a rx_RESPONSE(SUCCESS, REA) condition missing? The response
>   could be coming from an upstream NF and should be passed on. The
>   state would stay NONEDGE_REA.
>  
>
Right, it's missing. Will be fixed in the newest version.

> * Section 7 ("State machines for the NAT/FW NF"), state EDGE_REA:
>   The first condition looks like a copy and paste mistake. I think
>   a tx_RESPONSE(SUCCESS, REA) should be sent and the state should
>   stay EDGE_REA. An edge NF shouldn't send REAs any further.
>  
>
Oops, you're right. Thanks.

>   I also wonder where the tx_RESPONSE(ERROR, REA) in the second
>   condition could be coming from. The node is on the edge of the
>   network after all.
>  
>
Totally agree! Will be fixed.

> * Section 8 ("State machine for the NAT/FW NR"), state SESSION:
>   The tg_TEARDOWN looks unnecessary to me, the session should be
>   terminated by a rx_CREATE && CREATE(Lifetime) > 0 condition.
>  
>
Looks also like a copy & paste mistake. Fixed.

> * What about changing all those rx_CREATE && CREATE(Lifetime) > 0
>   style conditions to a more concise syntax, maybe like
>   rx_CREATE(lifetime > 0)? Or, maybe I should stop drawing with
>   a pencil.
>  
>
Good idea, espacily as the transmission style already follows this syntax.

>Since CREATE and REA sessions are different things (as I learned
>recently), it would IMHO make sense to split the NF and NR state
>machines into CREATE and REA parts. That way they'll be easier to
>understand and look nicer on paper (I tested it), especially when more
>conditions will be added later.
>
>The NR would be split into NR and NR-REA (or NI+) parts. The NR would
>consist of IDLE and SESSION states, while the NR-REA would consist of
>IDLE, WAITRESP (formerly REA_WAITRESP), and REA.
>
>The NF would consist of IDLE, WAITRESP, and SESSION states, while
>NF-REA consists of IDLE, EDGE_REA, and NONEDGE_REA.
>  
>

In a former version of the draft, we has split it into two 
statemachines. But we think it is better to have all in one statemachine.
If you have several hours time to draw it, it's looks very nice and is 
not so hard to understand ;-)
You might be interested to take a look to my figures. You can find them at:
http://user.informatik.uni-goettingen.de/~nsteinle/nsis/natfw/statemachine/natfw-statemachine-03.pdf 
<natfw%20statemachine-03.pdf>

Thanks for your helpful comments,
Best Regards,
Niklas

>Thanks,
>	Matthias, who hopes he didn't overlook something :-)
>
>_______________________________________________
>nsis mailing list
>[email-masked]
>https://www1.ietf.org/mailman/listinfo/nsis
>  
>

_______________________________________________
nsis mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/nsis

---

From: Matthias Friedrich <[email-masked]>
Date: Mon, 26 Jun 2006 17:32:20 +0200

Hi,

> Matthias Friedrich wrote:

[...]

>From your definition of tg_CREATE_PROXY, I assumed that a new session is
created which would then execute the tx_CREATE message.

Anyway, I'd also split the transition to avoid conditions in the
action part:

   Condition                    Action                        State

   ----------------------------+-----------------------------+----------
   [...]
                               |                             |
   rx_REA && IS_EDGE           |tx_RESPONSE(SUCCESS,REA);    | EDGE_REA
   && (!IS_PUBLICSIDE))        |                             |
                               |                             |
   rx_REA(proxy) && IS_EDGE    |tx_RESPONSE(SUCCESS,REA);    | EDGE_REA
   && (!IS_PUBLICSIDE))        |tg_CREATE_PROXY;             |
   ----------------------------+-----------------------------+----------

[...]

> statemachines. But we think it is better to have all in one statemachine.

In version 01, the NAT and FW state machines were separate and I agree
that it's good to have them united. In my implementation I separated 
the REA and non-REA parts and found the code a bit easier to handle.
Anyway, the state machine draft is still a big help to me.

A few more things:

 * The proxy_mode/proxy_object variables aren't defined.

 * ReportAsyncEvent() is undefined. If this is a notification for the
   application, then I think all ReportAsyncEvent() calls in the NF
   can be removed because there's no application running on top of
   the NSLP.

 * In the NF, state IDLE, the rx_CREATE(Lifetime > 0) condition isn't
   enough. At the moment, I see three cases:

      rx_CREATE(Lifetime > 0) && IS_PUBLICSIDE && !RESERVATION_EXISTS
	=> tx_RESPONSE(ERROR, CREATE); go to state IDLE

      rx_CREATE(Lifetime > 0) && IS_PUBLICSIDE && RESERVATION_EXISTS
	=> tx_CREATE(); go to state CREATE_WAITRESP

      rx_CREATE(Lifetime > 0) && !IS_PUBLICSIDE
	=> tx_CREATE(); go to state CREATE_WAITRESP

My implementation isn't finished yet, so I might find more issues to
report later.

Cheers,
	Matthias