mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-04 00:25:29 +00:00
Test new max-clients-per-query log warning
Make sure the new warning is logged.
This commit is contained in:
52
bin/tests/system/fetchlimit/ns5/named3.conf.in
Normal file
52
bin/tests/system/fetchlimit/ns5/named3.conf.in
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MPL-2.0
|
||||||
|
*
|
||||||
|
* 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 https://mozilla.org/MPL/2.0/.
|
||||||
|
*
|
||||||
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
|
* information regarding copyright ownership.
|
||||||
|
*/
|
||||||
|
|
||||||
|
options {
|
||||||
|
query-source address 10.53.0.5;
|
||||||
|
notify-source 10.53.0.5;
|
||||||
|
transfer-source 10.53.0.5;
|
||||||
|
port @PORT@;
|
||||||
|
directory ".";
|
||||||
|
pid-file "named.pid";
|
||||||
|
listen-on { 10.53.0.5; };
|
||||||
|
listen-on-v6 { none; };
|
||||||
|
recursion yes;
|
||||||
|
dnssec-validation yes;
|
||||||
|
notify yes;
|
||||||
|
stale-answer-enable yes;
|
||||||
|
stale-cache-enable yes;
|
||||||
|
stale-answer-client-timeout 0;
|
||||||
|
/* max-clients-per-query < clients-per-query */
|
||||||
|
clients-per-query 10;
|
||||||
|
max-clients-per-query 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
trust-anchors { };
|
||||||
|
|
||||||
|
server 10.53.0.4 {
|
||||||
|
edns no;
|
||||||
|
};
|
||||||
|
|
||||||
|
key rndc_key {
|
||||||
|
secret "1234abcd8765";
|
||||||
|
algorithm @DEFAULT_HMAC@;
|
||||||
|
};
|
||||||
|
|
||||||
|
controls {
|
||||||
|
inet 10.53.0.5 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
|
||||||
|
};
|
||||||
|
|
||||||
|
zone "." {
|
||||||
|
type hint;
|
||||||
|
file "root.hint";
|
||||||
|
};
|
@@ -328,5 +328,14 @@ echo_i "$zspill clients spilled (expected $expected)"
|
|||||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||||
status=$((status + ret))
|
status=$((status + ret))
|
||||||
|
|
||||||
|
n=$((n + 1))
|
||||||
|
echo_i "checking a warning is logged if max-clients-per-query < clients-per-query ($n)"
|
||||||
|
ret=0
|
||||||
|
copy_setports ns5/named3.conf.in ns5/named.conf
|
||||||
|
rndc_reconfig ns5 10.53.0.5
|
||||||
|
wait_for_message ns5/named.run "configured clients-per-query (10) exceeds max-clients-per-query (5); automatically adjusting max-clients-per-query to (10)" || ret=1
|
||||||
|
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||||
|
status=$((status + ret))
|
||||||
|
|
||||||
echo_i "exit status: $status"
|
echo_i "exit status: $status"
|
||||||
[ $status -eq 0 ] || exit 1
|
[ $status -eq 0 ] || exit 1
|
||||||
|
Reference in New Issue
Block a user