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
591
Issues
591
List
Boards
Labels
Service Desk
Milestones
Merge Requests
113
Merge Requests
113
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
04da28bd
Commit
04da28bd
authored
Jul 04, 2019
by
Mark Andrews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test max records policy
parent
919a9ece
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
1 deletion
+62
-1
bin/tests/system/nsupdate/clean.sh
bin/tests/system/nsupdate/clean.sh
+2
-0
bin/tests/system/nsupdate/ns6/named.conf.in
bin/tests/system/nsupdate/ns6/named.conf.in
+1
-1
bin/tests/system/nsupdate/tests.sh
bin/tests/system/nsupdate/tests.sh
+59
-0
No files found.
bin/tests/system/nsupdate/clean.sh
View file @
04da28bd
...
...
@@ -60,3 +60,5 @@ rm -f update.out.*
rm
-f
check.out.
*
rm
-f
update.out.
*
rm
-f
ns
*
/managed-keys.bind
*
ns
*
/
*
.mkeys
*
rm
-f
nextpart.out.
*
rm
-f
*
/named.run.prev
bin/tests/system/nsupdate/ns6/named.conf.in
View file @
04da28bd
...
...
@@ -34,5 +34,5 @@ controls {
zone "in-addr.arpa" {
type master;
file "in-addr.db";
update-policy { grant * tcp-self . PTR; };
update-policy { grant * tcp-self . PTR
(1) ANY(2) A
; };
};
bin/tests/system/nsupdate/tests.sh
View file @
04da28bd
...
...
@@ -1031,6 +1031,65 @@ grep "UPDATE, status: NOERROR" nsupdate.out-$n > /dev/null 2>&1 || ret=1
grep
"UPDATE, status: FORMERR"
nsupdate.out-
$n
>
/dev/null 2>&1
||
ret
=
1
[
$ret
=
0
]
||
{
echo_i
"failed"
;
status
=
1
;
}
n
=
`
expr
$n
+ 1
`
ret
=
0
echo_i
"check that max records is enforced (
$n
)"
nextpart ns6/named.run
>
/dev/null
$NSUPDATE
-v
>
nsupdate.out.
$n
2>&1
<<
END
server 10.53.0.6
${
PORT
}
local 10.53.0.5
update del 5.0.53.10.in-addr.arpa.
update add 5.0.53.10.in-addr.arpa. 600 PTR localhost.
update add 5.0.53.10.in-addr.arpa. 600 PTR other.
send
END
$DIG
$DIGOPTS
@10.53.0.6
\
+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd
\
-x
10.53.0.5
>
dig.out.ns6.
$n
# the policy is 'grant * tcp-self . PTR(1) ANY(2) A;' so only the
# first PTR record should be added.
grep
localhost. dig.out.ns6.
$n
>
/dev/null 2>&1
||
ret
=
1
grep
other. dig.out.ns6.
$n
>
/dev/null 2>&1
&&
ret
=
1
nextpart ns6/named.run
>
nextpart.out.
$n
grep
"attempt to add more records than permitted by policy"
nextpart.out.
$n
>
/dev/null
||
ret
=
1
if
test
$ret
-ne
0
then
echo_i
"failed"
;
status
=
1
fi
n
=
`
expr
$n
+ 1
`
ret
=
0
echo_i
"check that max records for ANY is enforced (
$n
)"
nextpart ns6/named.run
>
/dev/null
$NSUPDATE
-v
>
nsupdate.out.
$n
2>&1
<<
END
server 10.53.0.6
${
PORT
}
local 10.53.0.5
update del 5.0.53.10.in-addr.arpa.
update add 5.0.53.10.in-addr.arpa. 600 A 1.2.3.4
update add 5.0.53.10.in-addr.arpa. 600 A 1.2.3.3
update add 5.0.53.10.in-addr.arpa. 600 A 1.2.3.2
update add 5.0.53.10.in-addr.arpa. 600 AAAA ::ffff:1.2.3.4
update add 5.0.53.10.in-addr.arpa. 600 AAAA ::ffff:1.2.3.3
update add 5.0.53.10.in-addr.arpa. 600 AAAA ::ffff:1.2.3.2
send
END
$DIG
$DIGOPTS
@10.53.0.6
\
+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd
\
ANY
-x
10.53.0.5
>
dig.out.ns6.test
$n
nextpart ns6/named.run
>
nextpart.out.test
$n
grep
"attempt to add more records than permitted by policy"
nextpart.out.test
$n
>
/dev/null
||
ret
=
1
# the policy is 'grant * tcp-self . PTR(1) ANY(2) A;' so all the A
# records should have been added as there is no limit and the first 2
# of the AAAA records added as they match ANY(2).
c1
=
$(
awk
'$4 == "A" { print }'
dig.out.ns6.test
$n
|
wc
-l
)
c2
=
$(
awk
'$4 == "AAAA" { print }'
dig.out.ns6.test
$n
|
wc
-l
)
test
"
$c1
"
-eq
3
-a
"
$c2
"
-eq
2
||
ret
=
1
grep
"::ffff:1.2.3.2"
dig.out.ns6.test
$n
&&
ret
=
1
if
test
$ret
-ne
0
then
echo_i
"failed"
;
status
=
1
fi
if
$FEATURETEST
--gssapi
;
then
n
=
`
expr
$n
+ 1
`
ret
=
0
...
...
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