diff options
Diffstat (limited to 'tests/DHCPv6/211-solicit-opt-in-na.pl')
-rw-r--r-- | tests/DHCPv6/211-solicit-opt-in-na.pl | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/tests/DHCPv6/211-solicit-opt-in-na.pl b/tests/DHCPv6/211-solicit-opt-in-na.pl index 881285e7..73d7e2d1 100644 --- a/tests/DHCPv6/211-solicit-opt-in-na.pl +++ b/tests/DHCPv6/211-solicit-opt-in-na.pl @@ -97,7 +97,7 @@ my @docsis_oro = ( $DOCSIS_OPT_TFTP_SERVERS ); $vsio .= pack("nnC*", $DOCSIS_OPT_ORO, 0+@docsis_oro, @docsis_oro); # TLV5 data: CMTS DOCSIS version number 3.0 (required by DOCSIS) -my $tlv5_data = "\x01\x02\x03\x0"; +my $tlv5_data = "\x01\x02\x03\x0"; $vsio .= pack("nn", $DOCSIS_OPT_TLV5, length($tlv5_data)) . $tlv5_data; # DOCSIS Device (required by DOCSIS) @@ -132,10 +132,10 @@ do { socket(SOCK, PF_INET6, SOCK_DGRAM, getprotobyname('udp')) || die; my $addr = inet_pton(AF_INET6, $All_DHCP_Servers); my $packet = $msg->packet(); - my $send_ret = send(SOCK, $packet, 0, + my $send_ret = send(SOCK, $packet, 0, pack_sockaddr_in6($server_port, $addr)); if (not defined($send_ret)) { - printf STDERR + printf STDERR "Error \%d sending DHCPv6 Solicit message;\n\%s\n", 0+$ERRNO, $ERRNO; exit(1); @@ -156,7 +156,7 @@ do { } 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; } @@ -173,11 +173,11 @@ do { if (@ready) { my $reply; my $recv_ret; - + $recv_ret = recv(SOCK, $reply, 1500, 0); if (not defined $recv_ret) { - printf STDERR - "Error \%d receiving DHCPv6 " . + printf STDERR + "Error \%d receiving DHCPv6 " . "message;\n\%s\n", 0+$ERRNO, $ERRNO; exit(1); @@ -191,16 +191,16 @@ do { } } -} until ($reply_msg || +} until ($reply_msg || (($MRC != 0) && ($count > $MRC)) || (defined($mrd_end_time) && ($mrd_end_time > time()))); unless ($reply_msg) { if (($MRC != 0) && ($count >= $MRC)) { - print STDERR + print STDERR "No reply after maximum retransmission count.\n"; } else { - print STDERR + print STDERR "No reply after maximum retransmission duration.\n"; } } @@ -215,4 +215,3 @@ if ($reply_msg && ($reply_msg->{msg_type} == $MSG_REPLY)) { #print Dumper($msg->packet()), "\n"; # #print "packet length: ", length($msg->packet()), "\n"; - |