Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
BIND
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
583
Issues
583
List
Boards
Labels
Service Desk
Milestones
Merge Requests
111
Merge Requests
111
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
BIND
Commits
40fd600f
Commit
40fd600f
authored
Jul 21, 2020
by
Diego dos Santos Fronza
Committed by
Evan Hunt
Jul 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for RPZ wildcard passthru ignored fix
parent
33ae88f0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
88 additions
and
0 deletions
+88
-0
bin/tests/system/rpzrecurse/ns1/example.com.db
bin/tests/system/rpzrecurse/ns1/example.com.db
+16
-0
bin/tests/system/rpzrecurse/ns1/named.conf.in
bin/tests/system/rpzrecurse/ns1/named.conf.in
+5
-0
bin/tests/system/rpzrecurse/ns2/db.given
bin/tests/system/rpzrecurse/ns2/db.given
+10
-0
bin/tests/system/rpzrecurse/ns2/db.passthru
bin/tests/system/rpzrecurse/ns2/db.passthru
+8
-0
bin/tests/system/rpzrecurse/ns2/named.wildcard4.conf
bin/tests/system/rpzrecurse/ns2/named.wildcard4.conf
+33
-0
bin/tests/system/rpzrecurse/tests.sh
bin/tests/system/rpzrecurse/tests.sh
+14
-0
bin/tests/system/run.sh
bin/tests/system/run.sh
+2
-0
No files found.
bin/tests/system/rpzrecurse/ns1/example.com.db
0 → 100644
View file @
40fd600f
; 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
@ IN SOA ns.example.com. root.example.com. 1 3600 3600 3600 3600
@ NS ns.example.com.
ns.example.com. A 10.53.0.1
@ A 1.2.3.4
www A 1.2.3.5
bin/tests/system/rpzrecurse/ns1/named.conf.in
View file @
40fd600f
...
...
@@ -65,3 +65,8 @@ zone "test2.example.net" {
type master;
file "test2.example.net.db";
};
zone "example.com" {
type master;
file "example.com.db";
};
bin/tests/system/rpzrecurse/ns2/db.given
0 → 100644
View file @
40fd600f
$ORIGIN given.zone.
$TTL 3600
@ IN SOA ns.given.zone. hostmaster.given.zone. 1 600 300 604800 3600
IN NS ns.given.zone.
ns IN A 127.0.0.1
; this should be ignores as it matches earlier passthru entry.
example.com CNAME .
; this should be ignored as it matches earlier wildcard passthru entry.
www.example.com CNAME .
bin/tests/system/rpzrecurse/ns2/db.passthru
0 → 100644
View file @
40fd600f
$ORIGIN passthru.zone.
$TTL 3600
@ IN SOA ns.passthru.zone. hostmaster.passthru.zone. 1 600 300 604800 3600
IN NS ns.passthru.zone.
ns IN A 127.0.0.1
example.com CNAME rpz-passthru.
*.example.com CNAME rpz-passthru.
bin/tests/system/rpzrecurse/ns2/named.wildcard4.conf
0 → 100644
View file @
40fd600f
/*
*
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
.
*/
# common configuration
include
"named.conf.header"
;
view
"recursive"
{
# policy configuration to be tested
response
-
policy
{
zone
"passthru.zone"
policy
passthru
;
zone
"given.zone"
policy
given
;
};
# policy zones to be tested
zone
"passthru.zone"
{
type
master
;
file
"db.passthru"
; };
zone
"given.zone"
{
type
master
;
file
"db.given"
; };
zone
"."
{
type
hint
;
file
"root.hint"
;
};
recursion
yes
;
dnssec
-
validation
yes
;
};
bin/tests/system/rpzrecurse/tests.sh
View file @
40fd600f
...
...
@@ -390,5 +390,19 @@ if test $p1 -le $p2; then ret=1; fi
if
test
$ret
!=
0
;
then
echo_i
"failed"
;
fi
status
=
`
expr
$status
+
$ret
`
t
=
`
expr
$t
+ 1
`
echo_i
"testing wildcard passthru before explicit drop (
${
t
}
)"
run_server wildcard4
$DIG
$DIGOPTS
example.com a @10.53.0.2
-p
${
PORT
}
>
dig.out.
${
t
}
.1
grep
"status: NOERROR"
dig.out.
${
t
}
.1
>
/dev/null
||
{
echo_i
"test
${
t
}
failed"
status
=
1
}
$DIG
$DIGOPTS
www.example.com a @10.53.0.2
-p
${
PORT
}
>
dig.out.
${
t
}
.2
grep
"status: NOERROR"
dig.out.
${
t
}
.2
>
/dev/null
||
{
echo_i
"test
${
t
}
failed"
status
=
1
}
echo_i
"exit status:
$status
"
[
$status
-eq
0
]
||
exit
1
bin/tests/system/run.sh
View file @
40fd600f
...
...
@@ -230,6 +230,8 @@ elif [ "$assertion_failures" -ne 0 ]; then
elif
[
"
$sanitizer_summaries
"
-ne
0
]
;
then
echoinfo
"I:
$systest
:
$sanitizer_summaries
sanitizer report(s) found"
echofail
"R:
$systest
:FAIL"
elif
[
"
$status
"
!=
0
]
;
then
echofail
"R:
$systest
:FAIL"
else
echopass
"R:
$systest
:PASS"
if
$clean
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment