Index: [Article Count Order] [Thread]

Date: Tue, 19 Aug 2008 21:38:30 +0900
From: <Nobumichi.Ozoe@jp.yokogawa.com>
Subject: [users:00865] Re: [dhcptest:00294] serial connection issue at client test #33
To: <mitch@linux.vnet.ibm.com>
Cc: <dhcptest@tahi.org>, <users@tahi.org>
Message-Id: <44C6761D700E0F459CEB255EF80380D80120C9D60B82@EXMAIL01.jp.ykgw.net>
In-Reply-To: <20080819211449.05bac675.mitch@linux.vnet.ibm.com>
X-Mail-Count: 00865

Hi Chinen-san,

Thank you for your bug report and patch.
You are right. I check patch and release new version.

Best regards,

> -----Original Message-----
> From: Mitsuru Chinen [mailto:mitch@linux.vnet.ibm.com]
> Sent: Tuesday, August 19, 2008 9:15 PM
> To: dhcptest@tahi.org
> Subject: [dhcptest:00294] serial connection issue at client test #33
>
> Dear TAHI developers,
>
> At client test #33, "Part A : Receives Advertise message
> without Preference Option before first RT elapse", dhcp6c.rmt
> is called with vRemote(). This causes an issue when "System"
> is not "manual".
>
> When "System" is "manual" in nut.def, the script prompts to
> hit enter after a DHCPv6 client runs. Then, test can prepare
> to accept a solicit message until the first RT has elapsed.
>
> However, when "System" isn't "manual", the first RT elapses
> while cu command disconnects serial connection. In other
> words, the test is not ready to accept the 1st solicit
> message to accept a solicit message until the first RT has
> elapsed. When the test sends an advertisement message, DHCPv6
> clinet sends the 2nd solicit message.
>
> | 1  0.000000    fe80::200:ff:fe00:a6a6 ff02::1
>   ICMPv6   Router advertisement
> | 2  5.035868    3ffe:501:ffff:100:200:ff:fe00:a1a1
> 3ffe:501:ffff:100:21d:7dff:fe56:ab0a ICMPv6   Echo request
> | 3 13.190641   fe80::21d:7dff:fe56:ab0a ff02::1:2
>   DHCPv6   Solicit
> | 4 14.198550   fe80::21d:7dff:fe56:ab0a ff02::1:2
>   DHCPv6   Solicit
> | 5 15.493046   fe80::200:ff:fe00:a1a1
> fe80::21d:7dff:fe56:ab0a DHCPv6   Advertise
> | 6 15.493395   fe80::21d:7dff:fe56:ab0a ff02::1:2
>   DHCPv6   Request
>
> Therefore, I would like you to use vRemoteAsync() to solve
> this serial connection issue. Is it possible?
> The attachment is a reference patch.
>
> Thank you,
> ----
> Mitsuru Chinen <mitch@linux.vnet.ibm.com>
>
>
> diff --git a/rfc3315/C_RFC3315_17_1_2_SolWaitAdv.seq
> b/rfc3315/C_RFC3315_17_1_2_SolWaitAdv.seq
> index 88b25c7..2009d7e 100755
> --- a/rfc3315/C_RFC3315_17_1_2_SolWaitAdv.seq
> +++ b/rfc3315/C_RFC3315_17_1_2_SolWaitAdv.seq
> @@ -77,10 +77,15 @@ if($ret == 0){
>         dhcpExitFail;
>  }
>
> -my $ret = vRemote("dhcp6c.rmt", "start", "iana",
> "iaid=111111", "link0=$IF0_NUT");
> +if($V6evalTool::NutDef{System} ne 'manual'){
> +       $ret = vRemoteAsync("dhcp6c.rmt", "start", "iana",
> +"iaid=111111", "link0=$IF0_NUT"); } else {
> +       $ret = vRemote("dhcp6c.rmt", "start", "iana", "iaid=111111",
> +"link0=$IF0_NUT"); }
> +
>  if($ret != 0){
>         vLogHTML('<FONT COLOR="#FF0000">Cannot Initialize
> DHCPv6 Client program.</FONT><BR>');
> -       dhcpExitFail;
> +       goto fail;
>  };
>
>  #--------------------------------------------------------------#
> @@ -88,12 +93,12 @@ if($ret != 0){
>  #--------------------------------------------------------------#
>  my ($retsol,%sol) = wait_for_solicit($IF0,$init_timeout) ;
> if($retsol != 0){
> -       dhcpExitFail;
> +       goto fail;
>  }
>
>  $ret = options_exist(\%sol,$CMP_ETIME);  if($ret != 0){
> -       dhcpExitFail;
> +       goto fail;
>  }
>
>  $recvtime = getReceivedtime(\%sol);
> @@ -105,7 +110,7 @@ $SID_OPTION = "opt_SID_LLT_server1";
> $IA_NA_OPTION = "opt_IA_NA_Addr_woStatus";  my ($retadv,
> %adv) = send_advertise($IF0, "advertise_server1_to_nut",
> \%sol, "");  if($retadv != 0){
> -       dhcpExitFail;
> +       goto fail;
>  }
>
>  #--------------------------------------------------------------#
> @@ -113,7 +118,7 @@ if($retadv != 0){
>  #--------------------------------------------------------------#
>  my ($retreq,%req) = wait_for_request($IF0,30);  if($retreq != 0){
> -       dhcpExitFail;
> +       goto fail;
>  }
>
>  $replytime = getReceivedtime(\%req);
> @@ -122,14 +127,24 @@ $interval = $replytime - $recvtime;
> $ret = check_equal($interval, $IRT, $RAND);  if($ret != 0){
>          vLogHTML('<FONT COLOR="#FF0000"> RT != IRT +
> RAND*IRT </FONT><BR>');
> -        dhcpExitFail;
> +        goto fail;
>  };
>
>  vLogHTML("<FONT COLOR=\"#FF0000\">Delay is $interval sec. It
> satisfies RT = IRT + RAND*IRT.</FONT><BR>");
>
> +if($V6evalTool::NutDef{System} ne 'manual') {
> +       vRemoteAsyncWait();
> +}
>  vClear($IF0);
>  vStop($IF0);
>  dhcpExitPass;
> +
> +fail:
> +       if ($V6evalTool::NutDef{System} ne 'manual') {
> +               vRemoteAsyncWait()
> +       }
> +       dhcpExitFail;
> +
>  ##NEED
>
> ##############################################################
> #################
>  __END__
>
>