#!/usr/bin/perl
#
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
# Yokogawa Electric Corporation.
# All rights reserved.
#
# Redistribution and use of this software in source and binary
# forms, with or without modification, are permitted provided that
# the following conditions and disclaimer are agreed and accepted
# by the user:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with
# the distribution.
#
# 3. Neither the names of the copyrighters, the name of the project
# which is related to this software (hereinafter referred to as
# "project") nor the names of the contributors may be used to
# endorse or promote products derived from this software without
# specific prior written permission.
#
# 4. No merchantable use may be permitted without prior written
# notification to the copyrighters.
#
# 5. The copyrighters, the project and the contributors may prohibit
# the use of this software at any time.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHTERS, THE PROJECT AND
# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING
# BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE, ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHTERS, THE PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# $TAHI: ct/nd.p2/V6LC_2_1_8_H.seq,v 1.5 2005/06/14 06:03:16 akisada Exp $
#
########################################################################
use nd;
BEGIN {}
END {}
startNdiscWorld($Link0);
if(setupCase0($Link0) < 0) {
exitFatal();
#NOTREACHED
}
vLogHTML('TEST PROCEDURE'.
'
');
$pktdesc{'nd_ucast_ns_local'}
= ' Send NS (link-local) w/ SLL (invalid option length): '.
'TN (link-local) -> NUT (link-local)';
if(ndSendNsIgnore($Link0, 'nd_ucast_ns_local') < 0) {
exitFail();
#NOTREACHED
}
exitPass();
#NOTREACHED
#
# perldoc
#
########################################################################
__END__
=head1 NAME
=begin html
V6LC_2_1_8_H - Option of Length 0 =end html =begin html=end html =head1 TARGET =begin html
Host/Router=end html =head1 TOPOLOGY =begin html
=end html =head1 SETUP =begin htmlTN NUT | | ----+-------+--- Link0
Link0 link-local fe80::/64 TN link-local fe80::<TnDef.Link0_addr> ether <TnDef.Link0_addr> NUT link-local fe80::<NutDef.Link0_addr> ether <NutDef.Link0_addr>
=end html =head1 INITIALIZATION =begin htmlnone
=end html =head1 TEST PROCEDURE =begin htmlnone
- Verify that NUT ignores invalid NS=end html =head1 JUDGEMENT =begin html
TN NUT | | | ----> | NS | | * | Observe any packets for (RETRANS_TIMER) [Judgment #1] | | | ----> | Echo Request | <-- | NS (multicast) [Judgment #2] | <-- | NS (multicast) | <-- | NS (multicast) | | V V
State: NONE (TN) (link-local)1. Send NSIPv6 header hop limit = 255 source = TN (link-local) destination = NUT (link-local) NS target = NUT (link-local) SLL option address = TN (link-local) TLL option length = 0 address = NUT (link-local)2. Observe any packets for (RETRANS_TIMER) [Judgment #1]Node constants: RETRANS_TIMER: 1,000 milliseconds3. Send Echo RequestIPv6 header source = TN (link-local) destination = NUT (link-local) Echo RequestState: INCOMPLETE (TN) (link-local)4. Observe MAX_MULTICAST_SOLICIT NSs [Judgment #2]IPv6 header hop limit = 255 source = NUT (link-local) destination = TN (solicited-node multicast address) NS target = TN (link-local) SLL optionNode constants: MAX_MULTICAST_SOLICIT: 3 transmissionsState: NONE (TN) (link-local)
=end html =head1 CLEANUP =begin html[Judgment #1] NUT must not transmit any packets [Judgment #2] NUT must transmit 3 NSs to TN (solicited-node multicast address)
=end html =cut # =head1 REFERENCE # # =begin html #none
# RFC2461 Neighbor Discovery for IPv6 ## # =end html # =pod =head1 REFERENCE =begin html
## 7.1.1. Validation of Neighbor Solicitations ### A node MUST silently discard any received Neighbor Solicitation # messages that do not satisfy all of the following validity checks: ### - The IP Hop Limit field has a value of 255, i.e., the packet # could not possibly have been forwarded by a router. ### - If the message includes an IP Authentication Header, the message # authenticates correctly. ### - ICMP Checksum is valid. ### - ICMP Code is 0. ### - ICMP length (derived from the IP length) is 24 or more octets. ### - Target Address is not a multicast address. ### - All included options have a length that is greater than zero. ### - If the IP source address is the unspecified address, the IP # destination address is a solicited-node multicast address. ### - If the IP source address is the unspecified address, there is no # source link-layer address option in the message. ##
=end html =cutRFC 2461 - Neighbor Discovery for IPv6