diff options
Diffstat (limited to '')
21 files changed, 346 insertions, 0 deletions
diff --git a/bin/tests/system/dscp/clean.sh b/bin/tests/system/dscp/clean.sh new file mode 100644 index 0000000..b29303a --- /dev/null +++ b/bin/tests/system/dscp/clean.sh @@ -0,0 +1,15 @@ +# Copyright (C) Internet Systems Consortium, Inc. ("ISC") +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# See the COPYRIGHT file distributed with this work for additional +# information regarding copyright ownership. + +rm -f */root.bk +rm -f dig.out.10.53.0.? +rm -f */named.memstats +rm -f */named.run +rm -f */named.conf +rm -f ns*/named.lock diff --git a/bin/tests/system/dscp/ns1/named.args b/bin/tests/system/dscp/ns1/named.args new file mode 100644 index 0000000..c9a0592 --- /dev/null +++ b/bin/tests/system/dscp/ns1/named.args @@ -0,0 +1 @@ +-m record,size,mctx -T clienttest -c named.conf -d 99 -X named.lock -g -U 4 -T dscp=46 diff --git a/bin/tests/system/dscp/ns1/named.conf.in b/bin/tests/system/dscp/ns1/named.conf.in new file mode 100644 index 0000000..a6e8b41 --- /dev/null +++ b/bin/tests/system/dscp/ns1/named.conf.in @@ -0,0 +1,28 @@ +/* + * Copyright (C) Internet Systems Consortium, Inc. ("ISC") + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * See the COPYRIGHT file distributed with this work for additional + * information regarding copyright ownership. + */ + +options { + dscp 46; + query-source address 10.53.0.1; + notify-source 10.53.0.1; + transfer-source 10.53.0.1; + port @PORT@; + pid-file "named.pid"; + listen-on { 10.53.0.1; }; + listen-on-v6 { none; }; + recursion no; + notify yes; +}; + +zone "." { + type master; + file "root.db"; +}; diff --git a/bin/tests/system/dscp/ns1/root.db b/bin/tests/system/dscp/ns1/root.db new file mode 100644 index 0000000..3bd5829 --- /dev/null +++ b/bin/tests/system/dscp/ns1/root.db @@ -0,0 +1,17 @@ +; Copyright (C) Internet Systems Consortium, Inc. ("ISC") +; +; This Source Code Form is subject to the terms of the Mozilla Public +; License, v. 2.0. If a copy of the MPL was not distributed with this +; file, You can obtain one at http://mozilla.org/MPL/2.0/. +; +; See the COPYRIGHT file distributed with this work for additional +; information regarding copyright ownership. + +$TTL 3600 +. SOA ns1.nil-servers. marka.isc.org. 1 3600 1200 3600000 1200 +. NS ns1.nil-servers. +. NS ns2.nil-servers. +ns1.nil-servers. A 10.53.0.1 +ns2.nil-servers. A 10.53.0.2 +xxx.example. A 10.53.0.1 +xxx.tld. A 10.53.0.1 diff --git a/bin/tests/system/dscp/ns2/named.args b/bin/tests/system/dscp/ns2/named.args new file mode 100644 index 0000000..c9a0592 --- /dev/null +++ b/bin/tests/system/dscp/ns2/named.args @@ -0,0 +1 @@ +-m record,size,mctx -T clienttest -c named.conf -d 99 -X named.lock -g -U 4 -T dscp=46 diff --git a/bin/tests/system/dscp/ns2/named.conf.in b/bin/tests/system/dscp/ns2/named.conf.in new file mode 100644 index 0000000..6419a01 --- /dev/null +++ b/bin/tests/system/dscp/ns2/named.conf.in @@ -0,0 +1,29 @@ +/* + * Copyright (C) Internet Systems Consortium, Inc. ("ISC") + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * See the COPYRIGHT file distributed with this work for additional + * information regarding copyright ownership. + */ + +options { + dscp 46; + query-source address 10.53.0.2; + notify-source 10.53.0.2; + transfer-source 10.53.0.2; + port @PORT@; + pid-file "named.pid"; + listen-on { 10.53.0.2; }; + listen-on-v6 { none; }; + recursion no; + notify yes; +}; + +zone "." { + type slave; + file "root.bk"; + masters { 10.53.0.1; }; +}; diff --git a/bin/tests/system/dscp/ns3/hint.db b/bin/tests/system/dscp/ns3/hint.db new file mode 100644 index 0000000..5fe03e7 --- /dev/null +++ b/bin/tests/system/dscp/ns3/hint.db @@ -0,0 +1,14 @@ +; Copyright (C) Internet Systems Consortium, Inc. ("ISC") +; +; This Source Code Form is subject to the terms of the Mozilla Public +; License, v. 2.0. If a copy of the MPL was not distributed with this +; file, You can obtain one at http://mozilla.org/MPL/2.0/. +; +; See the COPYRIGHT file distributed with this work for additional +; information regarding copyright ownership. + +$TTL 3600 +. NS ns1.nil-servers. +. NS ns2.nil-servers. +ns1.nil-servers. A 10.53.0.1 +ns2.nil-servers. A 10.53.0.2 diff --git a/bin/tests/system/dscp/ns3/named.args b/bin/tests/system/dscp/ns3/named.args new file mode 100644 index 0000000..c9a0592 --- /dev/null +++ b/bin/tests/system/dscp/ns3/named.args @@ -0,0 +1 @@ +-m record,size,mctx -T clienttest -c named.conf -d 99 -X named.lock -g -U 4 -T dscp=46 diff --git a/bin/tests/system/dscp/ns3/named.conf.in b/bin/tests/system/dscp/ns3/named.conf.in new file mode 100644 index 0000000..71d72cd --- /dev/null +++ b/bin/tests/system/dscp/ns3/named.conf.in @@ -0,0 +1,27 @@ +/* + * Copyright (C) Internet Systems Consortium, Inc. ("ISC") + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * See the COPYRIGHT file distributed with this work for additional + * information regarding copyright ownership. + */ + +options { + dscp 46; + query-source address 10.53.0.3; + notify-source 10.53.0.3; + transfer-source 10.53.0.3; + port @PORT@; + pid-file "named.pid"; + listen-on { 10.53.0.3; }; + listen-on-v6 { none; }; + notify yes; +}; + +zone "." { + type hint; + file "hint.db"; +}; diff --git a/bin/tests/system/dscp/ns4/named.args b/bin/tests/system/dscp/ns4/named.args new file mode 100644 index 0000000..c9a0592 --- /dev/null +++ b/bin/tests/system/dscp/ns4/named.args @@ -0,0 +1 @@ +-m record,size,mctx -T clienttest -c named.conf -d 99 -X named.lock -g -U 4 -T dscp=46 diff --git a/bin/tests/system/dscp/ns4/named.conf.in b/bin/tests/system/dscp/ns4/named.conf.in new file mode 100644 index 0000000..70dd5e5 --- /dev/null +++ b/bin/tests/system/dscp/ns4/named.conf.in @@ -0,0 +1,28 @@ +/* + * Copyright (C) Internet Systems Consortium, Inc. ("ISC") + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * See the COPYRIGHT file distributed with this work for additional + * information regarding copyright ownership. + */ + +options { + dscp 47; + query-source dscp 46 address 10.53.0.4; + notify-source 10.53.0.4 dscp 46; + transfer-source 10.53.0.4 dscp 46; + port @PORT@; + pid-file "named.pid"; + listen-on dscp 46 { 10.53.0.4; }; + listen-on-v6 { none; }; + recursion no; + notify yes; +}; + +zone "." { + type master; + file "root.db"; +}; diff --git a/bin/tests/system/dscp/ns4/root.db b/bin/tests/system/dscp/ns4/root.db new file mode 100644 index 0000000..d1627db --- /dev/null +++ b/bin/tests/system/dscp/ns4/root.db @@ -0,0 +1,17 @@ +; Copyright (C) Internet Systems Consortium, Inc. ("ISC") +; +; This Source Code Form is subject to the terms of the Mozilla Public +; License, v. 2.0. If a copy of the MPL was not distributed with this +; file, You can obtain one at http://mozilla.org/MPL/2.0/. +; +; See the COPYRIGHT file distributed with this work for additional +; information regarding copyright ownership. + +$TTL 3600 +. SOA ns4.nil-servers. marka.isc.org. 1 3600 1200 3600000 1200 +. NS ns4.nil-servers. +. NS ns5.nil-servers. +ns4.nil-servers. A 10.53.0.4 +ns5.nil-servers. A 10.53.0.5 +xxx.example. A 10.53.0.1 +xxx.tld. A 10.53.0.1 diff --git a/bin/tests/system/dscp/ns5/named.args b/bin/tests/system/dscp/ns5/named.args new file mode 100644 index 0000000..c9a0592 --- /dev/null +++ b/bin/tests/system/dscp/ns5/named.args @@ -0,0 +1 @@ +-m record,size,mctx -T clienttest -c named.conf -d 99 -X named.lock -g -U 4 -T dscp=46 diff --git a/bin/tests/system/dscp/ns5/named.conf.in b/bin/tests/system/dscp/ns5/named.conf.in new file mode 100644 index 0000000..e2726c3 --- /dev/null +++ b/bin/tests/system/dscp/ns5/named.conf.in @@ -0,0 +1,30 @@ +/* + * Copyright (C) Internet Systems Consortium, Inc. ("ISC") + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * See the COPYRIGHT file distributed with this work for additional + * information regarding copyright ownership. + */ + +options { + dscp 47; + query-source dscp 46 address 10.53.0.5; + notify-source 10.53.0.5 dscp 46; + transfer-source 10.53.0.5 dscp 46; + alt-transfer-source 10.53.0.5 dscp 46; + port @PORT@; + pid-file "named.pid"; + listen-on dscp 46 { 10.53.0.5; }; + listen-on-v6 { none; }; + recursion no; + notify yes; +}; + +zone "." { + type slave; + file "root.bk"; + masters { 10.53.0.4; }; +}; diff --git a/bin/tests/system/dscp/ns6/hint.db b/bin/tests/system/dscp/ns6/hint.db new file mode 100644 index 0000000..8c54e3a --- /dev/null +++ b/bin/tests/system/dscp/ns6/hint.db @@ -0,0 +1,14 @@ +; Copyright (C) Internet Systems Consortium, Inc. ("ISC") +; +; This Source Code Form is subject to the terms of the Mozilla Public +; License, v. 2.0. If a copy of the MPL was not distributed with this +; file, You can obtain one at http://mozilla.org/MPL/2.0/. +; +; See the COPYRIGHT file distributed with this work for additional +; information regarding copyright ownership. + +$TTL 3600 +. NS ns4.nil-servers. +. NS ns5.nil-servers. +ns4.nil-servers. A 10.53.0.4 +ns5.nil-servers. A 10.53.0.5 diff --git a/bin/tests/system/dscp/ns6/named.args b/bin/tests/system/dscp/ns6/named.args new file mode 100644 index 0000000..c9a0592 --- /dev/null +++ b/bin/tests/system/dscp/ns6/named.args @@ -0,0 +1 @@ +-m record,size,mctx -T clienttest -c named.conf -d 99 -X named.lock -g -U 4 -T dscp=46 diff --git a/bin/tests/system/dscp/ns6/named.conf.in b/bin/tests/system/dscp/ns6/named.conf.in new file mode 100644 index 0000000..eedbab1 --- /dev/null +++ b/bin/tests/system/dscp/ns6/named.conf.in @@ -0,0 +1,27 @@ +/* + * Copyright (C) Internet Systems Consortium, Inc. ("ISC") + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * See the COPYRIGHT file distributed with this work for additional + * information regarding copyright ownership. + */ + +options { + dscp 47; + query-source dscp 46 address 10.53.0.6; + notify-source 10.53.0.6 dscp 46; + transfer-source 10.53.0.6 dscp 46; + port @PORT@; + pid-file "named.pid"; + listen-on dscp 46 { 10.53.0.6; }; + listen-on-v6 { none; }; + notify yes; +}; + +zone "." { + type hint; + file "hint.db"; +}; diff --git a/bin/tests/system/dscp/ns7/named.args b/bin/tests/system/dscp/ns7/named.args new file mode 100644 index 0000000..c9a0592 --- /dev/null +++ b/bin/tests/system/dscp/ns7/named.args @@ -0,0 +1 @@ +-m record,size,mctx -T clienttest -c named.conf -d 99 -X named.lock -g -U 4 -T dscp=46 diff --git a/bin/tests/system/dscp/ns7/named.conf.in b/bin/tests/system/dscp/ns7/named.conf.in new file mode 100644 index 0000000..e7c9528 --- /dev/null +++ b/bin/tests/system/dscp/ns7/named.conf.in @@ -0,0 +1,33 @@ +/* + * Copyright (C) Internet Systems Consortium, Inc. ("ISC") + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * See the COPYRIGHT file distributed with this work for additional + * information regarding copyright ownership. + */ + +options { + dscp 47; + query-source dscp 46 address 10.53.0.7; + notify-source 10.53.0.7 dscp 47; + transfer-source 10.53.0.7 dscp 47; + alt-transfer-source 10.53.0.7 dscp 47; + port @PORT@; + pid-file "named.pid"; + listen-on dscp 46 { 10.53.0.7; }; + listen-on-v6 { none; }; + recursion no; + notify yes; +}; + +zone "." { + type slave; + file "root.bk"; + transfer-source 10.53.0.7 dscp 46; + notify-source 10.53.0.7 dscp 46; + alt-transfer-source 10.53.0.7 dscp 46; + masters { 10.53.0.4; }; +}; diff --git a/bin/tests/system/dscp/setup.sh b/bin/tests/system/dscp/setup.sh new file mode 100644 index 0000000..fa6de38 --- /dev/null +++ b/bin/tests/system/dscp/setup.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# +# Copyright (C) Internet Systems Consortium, Inc. ("ISC") +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# See the COPYRIGHT file distributed with this work for additional +# information regarding copyright ownership. + +SYSTEMTESTTOP=.. +. $SYSTEMTESTTOP/conf.sh + +$SHELL clean.sh +copy_setports ns1/named.conf.in ns1/named.conf +copy_setports ns2/named.conf.in ns2/named.conf +copy_setports ns3/named.conf.in ns3/named.conf +copy_setports ns4/named.conf.in ns4/named.conf +copy_setports ns5/named.conf.in ns5/named.conf +copy_setports ns6/named.conf.in ns6/named.conf +copy_setports ns7/named.conf.in ns7/named.conf diff --git a/bin/tests/system/dscp/tests.sh b/bin/tests/system/dscp/tests.sh new file mode 100644 index 0000000..e8a20f5 --- /dev/null +++ b/bin/tests/system/dscp/tests.sh @@ -0,0 +1,38 @@ +# Copyright (C) Internet Systems Consortium, Inc. ("ISC") +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# See the COPYRIGHT file distributed with this work for additional +# information regarding copyright ownership. + +SYSTEMTESTTOP=.. +. $SYSTEMTESTTOP/conf.sh + +DIGOPTS="+tcp +noadd +nosea +nostat +noquest -p ${PORT}" + +status=0 + +# +# 10.53.0.1 10.53.0.2 10.53.0.3 have a global dscp setting; +# 10.53.0.4 10.53.0.5 10.53.0.6 have dscp set in option *-source clauses; +# 10.53.0.7 has dscp set in zone *-source clauses; +# +for server in 10.53.0.1 10.53.0.2 10.53.0.3 10.53.0.4 10.53.0.5 \ + 10.53.0.6 10.53.0.7 +do + echo_i "testing root SOA lookup at $server" + for i in 0 1 2 3 4 5 6 7 8 9 + do + ret=0 + $DIG $DIGOPTS @$server soa . > dig.out.$server + grep "status: NOERROR" dig.out.$server > /dev/null || ret=1 + test $ret = 0 && break + sleep 1 + done + test $ret = 0 || { echo_i "failed"; status=`expr $status + $ret`; } +done + +echo_i "exit status: $status" +[ $status -eq 0 ] || exit 1 |