-
-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix #1021 Inconsistent Behavior with Changing rpz-cname-override
and doing a unbound-control reload.
- Loading branch information
1 parent
d382210
commit 320d0a5
Showing
11 changed files
with
312 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
example.org. 3600 IN SOA ns1.example.org. hostmaster.example.org. 1379078166 28800 7200 604800 7200 | ||
www.example.org. A 1.2.3.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
; example rpz file | ||
rpz.example.com. 3600 IN SOA ns1.rpz.example.com. hostmaster.rpz.example.com. 1379078166 28800 7200 604800 7200 | ||
NS ns1.rpz.example.com. | ||
NS ns2.rpz.example.com. | ||
foo.example.net CNAME . | ||
www.example.net A 1.2.3.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
server: | ||
verbosity: 7 | ||
# num-threads: 1 | ||
interface: 127.0.0.1 | ||
port: @PORT@ | ||
use-syslog: no | ||
directory: "" | ||
pidfile: "unbound.pid" | ||
chroot: "" | ||
username: "" | ||
module-config: "respip iterator" | ||
log-time-ascii: yes | ||
|
||
remote-control: | ||
control-enable: yes | ||
control-interface: @CONTROL_PATH@/controlpipe.@CONTROL_PID@ | ||
control-use-cert: no | ||
|
||
rpz: | ||
name: "rpz.example.com" | ||
zonefile: "rpz.example.com.zone" | ||
rpz-action-override: cname | ||
rpz-cname-override: "www.example.org" | ||
rpz-log: yes | ||
rpz-log-name: "example policy" | ||
|
||
auth-zone: | ||
name: "example.org" | ||
zonefile: "example.org.zone" | ||
for-upstream: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
BaseName: rpz_reload | ||
Version: 1.0 | ||
Description: check rpz reload change | ||
CreationDate: Mon 11 Mar 16:00:00 CET 2024 | ||
Maintainer: dr. W.C.A. Wijngaards | ||
Category: | ||
Component: | ||
CmdDepends: | ||
Depends: | ||
Help: | ||
Pre: rpz_reload.pre | ||
Post: rpz_reload.post | ||
Test: rpz_reload.test | ||
AuxFiles: | ||
Passed: | ||
Failure: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# #-- rpz_reload.post --# | ||
# source the master var file when it's there | ||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master | ||
# source the test var file when it's there | ||
[ -f .tpkg.var.test ] && source .tpkg.var.test | ||
# | ||
# do your teardown here | ||
. ../common.sh | ||
echo "> cat logfiles" | ||
cat unbound.log | ||
kill_pid $UNBOUND_PID | ||
rm -f $CONTROL_PATH/controlpipe.$CONTROL_PID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# #-- rpz_reload.pre--# | ||
# source the master var file when it's there | ||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master | ||
# use .tpkg.var.test for in test variable passing | ||
[ -f .tpkg.var.test ] && source .tpkg.var.test | ||
|
||
. ../common.sh | ||
|
||
get_random_port 1 | ||
UNBOUND_PORT=$RND_PORT | ||
echo "UNBOUND_PORT=$UNBOUND_PORT" >> .tpkg.var.test | ||
|
||
# make config file | ||
CONTROL_PATH=/tmp | ||
CONTROL_PID=$$ | ||
sed -e 's/@PORT\@/'$UNBOUND_PORT'/' -e 's?@CONTROL_PATH\@?'$CONTROL_PATH'?' -e 's/@CONTROL_PID@/'$CONTROL_PID'/' < rpz_reload.conf > ub.conf | ||
# start unbound in the background | ||
PRE="../.." | ||
$PRE/unbound -d -c ub.conf >unbound.log 2>&1 & | ||
UNBOUND_PID=$! | ||
echo "UNBOUND_PID=$UNBOUND_PID" >> .tpkg.var.test | ||
echo "CONTROL_PATH=$CONTROL_PATH" >> .tpkg.var.test | ||
echo "CONTROL_PID=$CONTROL_PID" >> .tpkg.var.test | ||
|
||
cat .tpkg.var.test | ||
wait_unbound_up unbound.log |
Oops, something went wrong.