mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-25 10:59:35 -05:00
This commit adds a system test suite for PROXYv2. The idea on which it is based is simple: 1. Firstly we check that 'allow-proxy' and 'allow-proxy-on' (whatever is using the new 'isc_nmhandle_real_localaddr/peeraddr()') do what they intended to do. 2. Anything else that needs an interface or peer address (ACL functionality, for example) is using the old 'isc_nmhandle_localaddr/peeraddr()' - which are now returning addresses received via PROXY (if any) instead of the real connection addresses. The beauty of it that we DO NOT need to verify every bit of the code relying on these functions: whatever works in one place will work everywhere else, as these were the only functions that allowed any higher level code to get peer and interface addresses. This way it is relatively easy to see if PROXYv2 works as intended.
23 lines
716 B
Bash
23 lines
716 B
Bash
#!/bin/sh
|
|
|
|
# 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.
|
|
|
|
# shellcheck disable=SC1091
|
|
. ../conf.sh
|
|
|
|
$SHELL clean.sh
|
|
|
|
$SHELL "${TOP_SRCDIR}"/bin/tests/system/genzone.sh 2 >ns1/example.db
|
|
$SHELL "${TOP_SRCDIR}"/bin/tests/system/genzone.sh 2 >ns3/example.db
|
|
|
|
copy_setports ns1/named.conf.in ns1/named.conf
|
|
copy_setports ns3/named.conf.in ns3/named.conf
|