Issue 106: WaitJoin may be unnecessary
From: Pat Calhoun (pacalhou) (pcalhouncisco.com)
Date: Mon, 4 Aug 2008 14:31:33 -0700 (PDT)
All,

I need to re-open this issue, as I have just found out while fixing
issue 173 that we continue to have a problem. The original intent of the
WaitJoin was to make sure that once the DTLS session was established,
the AC had a chance to teardown the session if the WTP were inactive.
Unfortunately, the fix was not correct.

Specifically, the following state transition is the issue, as you will
note that this transition can occur if the WaitDTLS timer expires:
<problematic text>
   Join to DTLS Teardown (e):  This transition occurs when the join
      process failed.

      WTP:  This state transition occurs when the WTP receives a Join
         Response message with a Result Code message element containing
         an error, if the Image Identifier provided by the AC in the
         Join Response message differs from the WTP's currently running
         firmware version and the WTP has the requested image in its
         non-volatile memory, or if the WaitDTLS timer expires.  This
         causes the WTP to initiate the DTLSShutdown command (see
         Section 2.3.2.1).  This transition also occurs if the WTP
         receives one of the following DTLS notifications: DTLSAborted,
         DTLSReassemblyFailure or DTLSPeerDisconnect.  The WTP starts
         the DTLSSessionDelete timer (see Section 4.7.6).

      AC:  This state transition occurs either if the WaitDTLS timer
         expires or if the AC transmits a Join Response message with a
         Result Code message element containing an error.  This causes
         the AC to initiate the DTLSShutdown command (see
         Section 2.3.2.1).  This transition also occurs if the AC
         receives one of the following DTLS notifications: DTLSAborted,
         DTLSReassemblyFailure or DTLSPeerDisconnect.  The AC starts the
         DTLSSessionDelete timer (see Section 4.7.6).
</problematic text>


However, as you can read in the following text, the WaitDTLS timer is
stopped when the Join state is entered:
<current text>
   DTLS Connect to Join (d):  This transition occurs when the DTLS
      Session is successfully established.

      WTP:  This state transition occurs when the WTP receives the
         DTLSEstablished notification (see Section 2.3.2.2), indicating
         that the DTLS session was successfully established.  When this
         notification is received, the FailedDTLSSessionCount counter is
         set to zero.  The WTP enters the Join state by transmiting the
         Join Request to the AC.  The WTP stops the WaitDTLS timer.

      AC:  This state transition occurs when the AC receives the
         DTLSEstablished notification (see Section 2.3.2.2), indicating
         that the DTLS session was successfully established.  When this
         notification is received, the FailedDTLSSessionCount counter is
         set to zero.  The AC stops the WaitDTLS timer.
</current text>

So, to be clear, only the AC needs this because if the WTP retransmits
the Join Request, the session will timeout anyhow through the "Join to
DTLSTeardown" state transition. So to help understand the fix, I will
provide narratives throughout the new text.

First, when the DTLS Session is established, and the AC disables the
WaitDTLS timer, it also starts the WaitJoin timer:

<new text>
   DTLS Connect to Join (d):  This transition occurs when the DTLS
      Session is successfully established.
[...]
      AC:  This state transition occurs when the AC receives the
         DTLSEstablished notification (see Section 2.3.2.2), indicating
         that the DTLS session was successfully established.  When this
         notification is received, the FailedDTLSSessionCount counter is
         set to zero.  The AC stops the WaitDTLS timer, and starts the
         WaitJoin timer.
</new text>

If the WaitJoin timer expires on the AC, it will transition from Join to
DTLSTeardown:

<new text>
   Join to DTLS Teardown (e):  This transition occurs when the join
      process failed.
[...]
      AC:  This state transition occurs either if the WaitJoin timer
         expires or if the AC transmits a Join Response message with a
         Result Code message element containing an error.  This causes
         the AC to initiate the DTLSShutdown command (see
         Section 2.3.2.1).  This transition also occurs if the AC
         receives one of the following DTLS notifications: DTLSAborted,
         DTLSReassemblyFailure or DTLSPeerDisconnect.  The AC starts the
         DTLSSessionDelete timer (see Section 4.7.6).
</new text>

Now, assuming that we transition out of the Join state, which can only
be the "Join to Image Data" or "Join to Configure" state transitions,
the WaitJoin is disabled on the AC:
<new text>
   Join to Image Data (f):  This state transition is used by the WTP and
      the AC to download executable firmware.
[...]
      AC:  This state transition occurs when the AC receives the Image
         Data Request message from the WTP, after having sent its Join
         Response to the WTP.  The AC stops the WaitJoin timer.  The AC
         MUST transmit an Image Data Response message (see
         Section 9.1.2) to the WTP, which includes a portion of the
         firmware.  The AC MUST start the ImageDataStartTimer timer (see
         Section 4.7).

   Join to Configure (g):  This state transition is used by the WTP and
      the AC to exchange configuration information.
[...]
      AC:  This state transition occurs when it receives the
         Configuration Status Request message from the WTP (see
         Section 8.2), which MAY include specific message elements to
         override the WTP's configuration.  The AC stops the WaitJoin
         timer.  The AC transmits the Configuration Status Response
         message (see Section 8.3) and starts the
         ChangeStatePendingTimer timer (see Section 4.7).
</new text>

Finally, the definition of the timer itself:
<new text>
4.7.16.  WaitJoin

   The maximum time, in seconds, an AC will wait after the DTLS session
   has been established until it receives the Join Request from the WTP.
   This timer MUST be greater than 20 seconds.

   Default: 60
</new text>

PatC
  • (no other messages in thread)

Results generated by Tiger Technologies using MHonArc.