Compare commits
1 Commits
bind-9.4
...
v9.4-ESV-R
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b29ba963e3 |
@@ -1,9 +1,9 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2004, 2011 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
#
|
||||
# Permission to use, copy, modify, and/or 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
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
@@ -15,13 +15,12 @@
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: tests.sh,v 1.23.18.2 2011/06/09 07:12:57 tbox Exp $
|
||||
# $Id: tests.sh,v 1.23 2004/03/05 05:01:55 marka Exp $
|
||||
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
status=0
|
||||
n=0
|
||||
|
||||
echo "I:fetching first copy of zone before update"
|
||||
$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.nil.\
|
||||
@@ -59,60 +58,6 @@ echo "I:comparing post-update copies to known good data"
|
||||
$PERL ../digcomp.pl knowngood.ns1.after dig.out.ns1 || status=1
|
||||
$PERL ../digcomp.pl knowngood.ns1.after dig.out.ns2 || status=1
|
||||
|
||||
n=`expr $n + 1`
|
||||
ret=0
|
||||
echo "I:check TYPE=0 update is rejected by nsupdate ($n)"
|
||||
$NSUPDATE <<END > nsupdate.out 2>&1 && ret=1
|
||||
server 10.53.0.1 5300
|
||||
update add example.nil. 300 in type0 ""
|
||||
send
|
||||
END
|
||||
grep "unknown class/type" nsupdate.out > /dev/null 2>&1 || ret=1
|
||||
if [ $ret -ne 0 ]; then
|
||||
echo "I:failed"
|
||||
status=1
|
||||
fi
|
||||
|
||||
n=`expr $n + 1`
|
||||
ret=0
|
||||
echo "I:check TYPE=0 prerequisite is handled ($n)"
|
||||
$NSUPDATE <<END > nsupdate.out 2>&1 || ret=1
|
||||
server 10.53.0.1 5300
|
||||
prereq nxrrset example.nil. type0
|
||||
send
|
||||
END
|
||||
$DIG +tcp version.bind txt ch @10.53.0.1 -p 5300 > dig.out.ns1.$n
|
||||
grep "status: NOERROR" dig.out.ns1.$n > /dev/null || ret=1
|
||||
if [ $ret -ne 0 ]; then
|
||||
echo "I:failed"
|
||||
status=1
|
||||
fi
|
||||
|
||||
n=`expr $n + 1`
|
||||
ret=0
|
||||
echo "I:check that TYPE=0 update is handled ($n)"
|
||||
echo "a0e4280000010000000100000000060001c00c000000fe000000000000" |
|
||||
$PERL ../packet.pl -a 10.53.0.1 -p 5300 -t tcp > /dev/null
|
||||
$DIG +tcp version.bind txt ch @10.53.0.1 -p 5300 > dig.out.ns1.$n
|
||||
grep "status: NOERROR" dig.out.ns1.$n > /dev/null || ret=1
|
||||
if test $ret -ne 0
|
||||
then
|
||||
echo "I:failed"
|
||||
status=1
|
||||
fi
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo "I:check that TYPE=0 additional data is handled ($n)"
|
||||
echo "a0e4280000010000000000010000060001c00c000000fe000000000000" |
|
||||
$PERL ../packet.pl -a 10.53.0.1 -p 5300 -t tcp > /dev/null
|
||||
$DIG +tcp version.bind txt ch @10.53.0.1 -p 5300 > dig.out.ns1.$n
|
||||
grep "status: NOERROR" dig.out.ns1.$n > /dev/null || ret=1
|
||||
if test $ret -ne 0
|
||||
then
|
||||
echo "I:failed"
|
||||
status=1
|
||||
fi
|
||||
|
||||
if $PERL -e 'use Net::DNS;' 2>/dev/null
|
||||
then
|
||||
echo "I:running update.pl test"
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: packet.pl,v 1.2.36.2 2011/06/09 00:42:47 each Exp $
|
||||
|
||||
# This is a tool for sending an arbitrary packet via UDP or TCP to an
|
||||
# arbitrary address and port. The packet is specified in a file or on
|
||||
# the standard input, in the form of a series of bytes in hexidecimal.
|
||||
# Whitespace is ignored, as is anything following a '#' symbol.
|
||||
#
|
||||
# For example, the following input would generate normal query for
|
||||
# isc.org/NS/IN":
|
||||
#
|
||||
# # QID:
|
||||
# 0c d8
|
||||
# # header:
|
||||
# 01 00 00 01 00 00 00 00 00 00
|
||||
# # qname isc.org:
|
||||
# 03 69 73 63 03 6f 72 67 00
|
||||
# # qtype NS:
|
||||
# 00 02
|
||||
# # qclass IN:
|
||||
# 00 01
|
||||
#
|
||||
# Note that we do not wait for a response for the server. This is simply
|
||||
# a way of injecting arbitrary packets to test server resposnes.
|
||||
#
|
||||
# Usage: packet.pl [-a <address>] [-p <port>] [-t (udp|tcp)] [filename]
|
||||
#
|
||||
# If not specified, address defaults to 127.0.0.1, port to 53, protocol
|
||||
# to udp, and file to stdin.
|
||||
#
|
||||
# XXX: Doesn't support IPv6 yet
|
||||
|
||||
require 5.006.001;
|
||||
|
||||
use strict;
|
||||
use Getopt::Std;
|
||||
use IO::File;
|
||||
use IO::Socket;
|
||||
|
||||
sub usage {
|
||||
print ("Usage: packet.pl [-a address] [-p port] [-t (tcp|udp)] [file]\n");
|
||||
exit 1;
|
||||
}
|
||||
|
||||
my %options={};
|
||||
getopts("a:p:t:", \%options);
|
||||
|
||||
my $addr = "127.0.0.1";
|
||||
$addr = $options{a} if defined $options{a};
|
||||
|
||||
my $port = 53;
|
||||
$port = $options{p} if defined $options{p};
|
||||
|
||||
my $proto = "udp";
|
||||
$proto = lc $options{t} if defined $options{t};
|
||||
usage if ($proto !~ /^(udp|tcp)$/);
|
||||
|
||||
my $file = "STDIN";
|
||||
if (@ARGV >= 1) {
|
||||
my $filename = shift @ARGV;
|
||||
open FH, "<$filename" or die "$filename: $!";
|
||||
$file = "FH";
|
||||
}
|
||||
|
||||
my $input = "";
|
||||
while (defined(my $line = <$file>) ) {
|
||||
chomp $line;
|
||||
$line =~ s/#.*$//;
|
||||
$input .= $line;
|
||||
}
|
||||
|
||||
$input =~ s/\s+//g;
|
||||
my $data = pack("H*", $input);
|
||||
my $len = length $data;
|
||||
|
||||
my $output = unpack("H*", $data);
|
||||
print ("sending: $output\n");
|
||||
|
||||
my $sock = IO::Socket::INET->new(PeerAddr => $addr, PeerPort => $port,
|
||||
Proto => $proto,) or die "$!";
|
||||
|
||||
my $bytes;
|
||||
if ($proto eq "udp") {
|
||||
$bytes = $sock->send($data);
|
||||
} else {
|
||||
$bytes = $sock->syswrite(pack("n", $len), 2);
|
||||
$bytes += $sock->syswrite($data, $len);
|
||||
}
|
||||
|
||||
print ("sent $bytes bytes to $addr:$port\n");
|
||||
$sock->close;
|
||||
close $file;
|
||||
@@ -1,6 +1,6 @@
|
||||
# $Id: SRCID,v 1.17.4.165 2011/06/15 02:16:43 tbox Exp $
|
||||
# $Id: SRCID,v 1.17.4.161 2011/05/31 01:15:47 tbox Exp $
|
||||
#
|
||||
# This file must follow /bin/sh rules. It is imported directly via
|
||||
# configure.
|
||||
#
|
||||
SRCID="( $Date: 2011/06/15 02:16:43 $ )"
|
||||
SRCID="( $Date: 2011/05/31 01:15:47 $ )"
|
||||
|
||||
@@ -654,9 +654,8 @@
|
||||
./bin/tests/system/nsupdate/ns2/.cvsignore X 2000,2001
|
||||
./bin/tests/system/nsupdate/ns2/named.conf CONF-C 2000,2001,2004,2007
|
||||
./bin/tests/system/nsupdate/setup.sh SH 2000,2001,2004
|
||||
./bin/tests/system/nsupdate/tests.sh SH 2000,2001,2004,2011
|
||||
./bin/tests/system/nsupdate/tests.sh SH 2000,2001,2004
|
||||
./bin/tests/system/nsupdate/update_test.pl PERL 2000,2001,2004
|
||||
./bin/tests/system/packet.pl PERL 2011
|
||||
./bin/tests/system/pending/clean.sh SH 2009
|
||||
./bin/tests/system/pending/ns1/named.conf CONF-C 2009
|
||||
./bin/tests/system/pending/ns1/root.db.in ZONE 2009,2010
|
||||
@@ -1913,7 +1912,7 @@
|
||||
./lib/dns/lookup.c C 2000,2001,2003,2004,2005,2007
|
||||
./lib/dns/master.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009
|
||||
./lib/dns/masterdump.c C 1999,2000,2001,2002,2003,2004,2005,2006,2008,2009,2011
|
||||
./lib/dns/message.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2011
|
||||
./lib/dns/message.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009
|
||||
./lib/dns/name.c C 1998,1999,2000,2001,2002,2003,2004,2005,2006
|
||||
./lib/dns/ncache.c C 1999,2000,2001,2002,2003,2004,2005,2010,2011
|
||||
./lib/dns/nsec.c C 1999,2000,2001,2003,2004,2005,2009
|
||||
|
||||
Reference in New Issue
Block a user