NAME

  GEN_CookieWhileShut.seq - Generation of error cause Cookie Received While Shutting Down


PURPOSE

  To check that if a COOKIE-ECHO chunk is sent in SHUTDOWN-ACK-SENT
  State then an ERROR chunk with cause Restart of Cookie Received
  While Shutting Down is sent.


SYNOPSIS

  ./GEN_CookieWhileShut.seq [-tooloption ...] -pkt ./GEN_CookieWhileShut.def
    -tooloption : v6eval tool option
  See Also: ../common/STD_PKT_COMMON.def
            ../common/SCTP_COMMON.def


PRE-TEST CONDITION

  Association is not established between endpoint A and B. Arrange
  the data in endpoint A such that COOKIE-ECHO message is sent to
  endpoint B after received SHUTDOWN-ACK message.


TEST PROCEDURE

  Endpoint A                           Endpoint B                ULP
  (ESTABLISHED)                        (ESTABLISHED)
   INIT              ----------------->
   (with NEW TAG)
                     <----------------- INIT ACK
                                        (with NEW STATE COOKIE)
   SHUTUDOWN         ----------------->
                     <----------------- SHUTDOWN-ACK
   COOKIE-ECHO       ----------------->
   (with NEW STATE COOKIE)
                     <----------------- SHUTDOWN-ACK with ERROR
                                        (Cookie Received While Shutting Down)
   SHUTDOWN-COMPLETE ----------------->
  TEST DESCRIPTION:
  1. Send COOKIE-ECHO chunk from endpoint A to B after received
     SHUTDOWN-ACK message.
  2. Check A: ERROR should be received at endpoint A.
  3. Check B: Error cause in ERROR is set to "Cookie Received
     While Shutting Down".


NOTE

  None


REFERENCE

  RFC 4960
  3.3.10.10.  Cookie Received While Shutting Down (10)
    Cause of error
    ---------------
    Cookie Received While Shutting Down: A COOKIE ECHO was received while
    the endpoint was in the SHUTDOWN-ACK-SENT state.  This error is
    usually returned in an ERROR chunk bundled with the retransmitted
    SHUTDOWN ACK.
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |     Cause Code=10              |      Cause Length=4          |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  5.2.4.  Handle a COOKIE ECHO when a TCB Exists
    If the endpoint is in the SHUTDOWN-ACK-SENT state and recognizes
    that the peer has restarted (Action A), it MUST NOT set up a new
    association but instead resend the SHUTDOWN ACK and send an ERROR
    chunk with a "Cookie Received While Shutting Down" error cause to
    its peer.