1#!/bin/sh 2 3# Copyright (C) Internet Systems Consortium, Inc. ("ISC") 4# 5# SPDX-License-Identifier: MPL-2.0 6# 7# This Source Code Form is subject to the terms of the Mozilla Public 8# License, v. 2.0. If a copy of the MPL was not distributed with this 9# file, you can obtain one at https://mozilla.org/MPL/2.0/. 10# 11# See the COPYRIGHT file distributed with this work for additional 12# information regarding copyright ownership. 13 14SYSTEMTESTTOP=.. 15. $SYSTEMTESTTOP/conf.sh 16 17$SHELL ../genzone.sh 2 >ns2/nil.db 18$SHELL ../genzone.sh 2 >ns2/other.db 19$SHELL ../genzone.sh 2 >ns2/static.db 20$SHELL ../genzone.sh 2 >ns4/example.db 21 22cp ns7/test.db.in ns7/test.db 23cp ns7/include.db.in ns7/include.db 24 25$SHELL ../genzone.sh 2 >ns6/huge.zone.db 26awk 'END { for (i = 1; i <= 1000000; i++) 27 printf "host%d IN A 10.53.0.6\n", i; }' < /dev/null >> ns6/huge.zone.db 28 29copy_setports ns2/named.conf.in ns2/named.conf 30copy_setports ns3/named.conf.in ns3/named.conf 31copy_setports ns4/named.conf.in ns4/named.conf 32copy_setports ns5/named.conf.in ns5/named.conf 33copy_setports ns6/named.conf.in ns6/named.conf 34copy_setports ns7/named.conf.in ns7/named.conf 35 36make_key () { 37 $RNDCCONFGEN -k key$1 -A $3 -s 10.53.0.4 -p $2 \ 38 > ns4/key${1}.conf 2> /dev/null 39 grep -E -v '(^# Start|^# End|^# Use|^[^#])' ns4/key$1.conf | cut -c3- | \ 40 sed 's/allow { 10.53.0.4/allow { any/' >> ns4/named.conf 41} 42 43$FEATURETEST --md5 && make_key 1 ${EXTRAPORT1} hmac-md5 44make_key 2 ${EXTRAPORT2} hmac-sha1 45make_key 3 ${EXTRAPORT3} hmac-sha224 46make_key 4 ${EXTRAPORT4} hmac-sha256 47make_key 5 ${EXTRAPORT5} hmac-sha384 48make_key 6 ${EXTRAPORT6} hmac-sha512 49 50cat >> ns4/named.conf <<- EOF 51 52controls { 53 inet 10.53.0.4 port ${EXTRAPORT7} 54 allow { any; } keys { "key1"; "key2"; "key3"; 55 "key4"; "key5"; "key6"; }; 56}; 57EOF 58