#!/usr/bin/perl # # SCTP Conformance Test Suite Implementation # (C) Copyright Fujitsu Ltd. 2008, 2009 # # This file is part of the SCTP Conformance Test Suite implementation. # # The SCTP Conformance Test Suite implementation is free software; # you can redistribute it and/or modify it under the terms of # the GNU General Public License version 2 as published by # the Free Software Foundation. # # The SCTP Conformance Test Suite implementation is distributed in the # hope that it will be useful, but WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU CC; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # # Please send any bug reports or fixes you make to the # email address(es): # networktest sctp # # Or submit a bug report through the following website: # http://networktest.sourceforge.net/ # # Written or modified by: # Hiroaki Kago # Wei Yongjun # # Any bugs reported given to us we will try to fix... any fixes shared will # be incorporated into the next SCTP release. # ############################################################################## BEGIN { $V6evalTool::TestVersion = '$Name: REL_1_0_1 $'; } use lib "../common"; use V6evalTool; use SCTP; %pktdesc = ( sctp_chunk_asconf_add_addr => "Recv SCTP CHUNK_ASCONF (Add IP Address)", sctp_chunk_asconf_ack_snd => "Send SCTP CHUNK_ASCONF_ACK (without any Error Cause)", sctp_chunk_heartbeat_link1 => "Send SCTP CHUNK_HEARTBEAT", sctp_chunk_heartbeat_ack_link1 => "Recv SCTP CHUNK_HEARTBEAT_ACK", ); $IF0 = Link0; $IF1 = Link1; vCapture($IF0); vCapture($IF1); sctpCheckEnv($IF0); sctpStartInteractiveServer($IF0, "recv", "add=$SCTP::CONF{'SCTP_NUT_NET1_ADDR'}", "recv"); vConnect($IF0); vLogHTML('================ Main Test ================='); %ret = vWarpRecv($IF0, 10, 0, 0, sctp_chunk_asconf_add_addr); if ($ret{status} != 0 || $ret{recvFrame} ne sctp_chunk_asconf_add_addr) { vLogHTML('Cannot receive SCTP CHUNK_ASCONF
'); vSend($IF0, sctp_chunk_abort_snd); vLogHTML('NG'); exit $V6evalTool::exitFail; } sctpFetchAsconfField(\%ret); vSend($IF0, sctp_chunk_asconf_ack_snd); vLogHTML('=== Check Whether Address is Add Success ==='); vSend($IF1, sctp_chunk_heartbeat_link1); %ret = vWarpRecv($IF1, 10, 0, 0, sctp_chunk_heartbeat_ack_link1); if ($ret{status} != 0 || $ret{recvFrame} ne sctp_chunk_heartbeat_ack_link1) { vLogHTML('Cannot receive SCTP CHUNK_HEARTBEAT_ACK
'); vSend($IF1, sctp_chunk_abort_snd); vLogHTML('NG'); exit $V6evalTool::exitFail; } vClose($IF0); vLogHTML(OK); exit $V6evalTool::exitPass; ###################################################################### __END__ =head1 NAME AsconfAckWithAddNoError.seq - ASCONF-ACK chunk is received to indicating Add IP Address success without any Error Cause =head1 PURPOSE To check that if ASCONF-ACK chunk is received to indicating Add IP Address success without any Error Cause then the endpoint should consider the address part of the existing association. =head1 SYNOPSIS =begin html
  ./AsconfAckWithAddNoError.seq [-tooloption ...] -pkt ./AsconfAckWithAddNoError.def
    -tooloption : v6eval tool option
  See Also: ../common/STD_PKT_COMMON.def
            ../common/SCTP_COMMON.def
=end html =head1 PRE-TEST CONDITION Association is established between endpoint A and B. Arrange date in endpoint B such that ASCONF chunk with Add IP Address Parameter is sent to endpoint A. =head1 TEST PROCEDURE Endpoint A Endpoint B ULP (ESTABLISHED) (ESTABLISHED) <----- Asconf <----------------- ASCONF (Add IP Address X) ASCONF-ACK -----------------> (without any Error Cause) HEARTBEAT -----------------> (IP Address X) <----------------- HEARTBEAT-ACK (IP Address X) TEST DESCRIPTION: 1. Sending ASCONF message with Delete IP Address Parameter from endpoint B to A. Record the message sequence using a signal emulator. 2. Send ASCONF-ACK message indicating Add IP Address success without any Error Cause from endpoint A to B. 3. Check A: Endpoint B should consider the address part of the existing association. =head1 NOTE None =head1 REFERENCE RFC 5061 4.1.2. Address Configuration Acknowledgment Chunk (ASCONF-ACK) This chunk is used by the receiver of an ASCONF Chunk to acknowledge the reception. It carries zero or more results for any ASCONF parameters that were processed by the receiver. This chunk MUST be sent in an authenticated way by using the mechanism defined in [RFC4895]. If this chunk is received unauthenticated it MUST be silently discarded as described in [RFC4895]. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type = 0x80 | Chunk Flags | Chunk Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ASCONF Parameter Response#1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ \ \ / .... / \ \ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ASCONF Parameter Response#N | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Sequence Number: 32 bits (unsigned integer) This value represents the Sequence Number for the received ASCONF Chunk that is acknowledged by this chunk. This value is copied from the received ASCONF Chunk. ASCONF Parameter Response: TLV format =begin html
    The ASCONF Parameter Response is used in the ASCONF-ACK to report the
    status of ASCONF processing.  By default, if a responding endpoint
    does not include any Error Cause, a success is indicated.  Thus a
    sender of an ASCONF-ACK MAY indicate complete success of all TLVs in
    an ASCONF by returning only the Chunk Type, Chunk Flags, Chunk Length
    (set to 8), and the Sequence Number.
=end html