[BACK]Return to 290-decline-nohost.pl CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / external / mpl / dhcp / dist / tests / DHCPv6

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/external/mpl/dhcp/dist/tests/DHCPv6/290-decline-nohost.pl between version 1.1.1.1.2.2 and 1.1.1.2

version 1.1.1.1.2.2, 2018/04/16 01:59:50 version 1.1.1.2, 2022/04/03 01:08:46
Line 1 
Line 1 
 #! /usr/bin/perl -w  #! /usr/bin/perl -w
   
 # Copyright (c) 2007,2009 by Internet Systems Consortium, Inc. ("ISC")  # Copyright (C) 2007-2022 Internet Systems Consortium, Inc. ("ISC")
 #  #
 # Permission to use, copy, modify, and distribute this software for any  # Permission to use, copy, modify, and distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above  # purpose with or without fee is hereby granted, provided that the above
Line 15 
Line 15 
 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.  # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #  #
 #   Internet Systems Consortium, Inc.  #   Internet Systems Consortium, Inc.
 #   950 Charter Street  #   PO Box 360
 #   Redwood City, CA 94063  #   Newmarket, NH 03857 USA
 #   <info@isc.org>  #   <info@isc.org>
 #   https://www.isc.org/  #   https://www.isc.org/
   
Line 89  do {
Line 89  do {
         socket(SOCK, PF_INET6, SOCK_DGRAM, getprotobyname('udp')) || die;          socket(SOCK, PF_INET6, SOCK_DGRAM, getprotobyname('udp')) || die;
         my $addr = inet_pton(AF_INET6, $All_DHCP_Servers);          my $addr = inet_pton(AF_INET6, $All_DHCP_Servers);
         my $packet = $msg->packet();          my $packet = $msg->packet();
         my $send_ret = send(SOCK, $packet, 0,          my $send_ret = send(SOCK, $packet, 0,
                             pack_sockaddr_in6($server_port, $addr));                              pack_sockaddr_in6($server_port, $addr));
         if (not defined($send_ret)) {          if (not defined($send_ret)) {
                 printf STDERR                  printf STDERR
                         "Error \%d sending DHCPv6 Solicit message;\n\%s\n",                          "Error \%d sending DHCPv6 Solicit message;\n\%s\n",
                         0+$ERRNO, $ERRNO;                          0+$ERRNO, $ERRNO;
                 exit(1);                  exit(1);
Line 113  do {
Line 113  do {
         }          }
   
         my $rt_end_time = time() + $RT;          my $rt_end_time = time() + $RT;
         if (defined($mrd_end_time) && ($mrd_end_time > $rt_end_time)) {          if (defined($mrd_end_time) && ($mrd_end_time > $rt_end_time)) {
                 $rt_end_time = $mrd_end_time;                  $rt_end_time = $mrd_end_time;
         }          }
   
Line 130  do {
Line 130  do {
                 if (@ready) {                  if (@ready) {
                         my $reply;                          my $reply;
                         my $recv_ret;                          my $recv_ret;
   
                         $recv_ret = recv(SOCK, $reply, 1500, 0);                          $recv_ret = recv(SOCK, $reply, 1500, 0);
                         if (not defined $recv_ret) {                          if (not defined $recv_ret) {
                                 printf STDERR                                  printf STDERR
                                         "Error \%d receiving DHCPv6 " .                                          "Error \%d receiving DHCPv6 " .
                                                 "message;\n\%s\n",                                                  "message;\n\%s\n",
                                         0+$ERRNO, $ERRNO;                                          0+$ERRNO, $ERRNO;
                                 exit(1);                                  exit(1);
Line 148  do {
Line 148  do {
                 }                  }
         }          }
   
 } until ($reply_msg ||  } until ($reply_msg ||
          (($MRC != 0) && ($count > $MRC)) ||           (($MRC != 0) && ($count > $MRC)) ||
          (defined($mrd_end_time) && ($mrd_end_time > time())));           (defined($mrd_end_time) && ($mrd_end_time > time())));
   
 unless ($reply_msg) {  unless ($reply_msg) {
         if (($MRC != 0) && ($count >= $MRC)) {          if (($MRC != 0) && ($count >= $MRC)) {
                 print STDERR                  print STDERR
                         "No reply after maximum retransmission count.\n";                          "No reply after maximum retransmission count.\n";
         } else {          } else {
                 print STDERR                  print STDERR
                         "No reply after maximum retransmission duration.\n";                          "No reply after maximum retransmission duration.\n";
         }          }
 }  }
Line 172  if ($reply_msg && ($reply_msg->{msg_type
Line 172  if ($reply_msg && ($reply_msg->{msg_type
 #print Dumper($msg->packet()), "\n";  #print Dumper($msg->packet()), "\n";
 #  #
 #print "packet length: ", length($msg->packet()), "\n";  #print "packet length: ", length($msg->packet()), "\n";
   

Legend:
Removed from v.1.1.1.1.2.2  
changed lines
  Added in v.1.1.1.2

CVSweb <webmaster@jp.NetBSD.org>