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
633
Issues
633
List
Boards
Labels
Service Desk
Milestones
Merge Requests
107
Merge Requests
107
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
7d262a36
Commit
7d262a36
authored
Jun 24, 2016
by
Mark Andrews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4394. [func] Add rndc command "dnstap-reopen" to close and
reopen dnstap output filed. [RT #41803]
parent
e8300d72
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
400 additions
and
1356 deletions
+400
-1356
CHANGES
CHANGES
+3
-0
bin/named/control.c
bin/named/control.c
+2
-0
bin/named/include/named/control.h
bin/named/include/named/control.h
+1
-0
bin/named/include/named/server.h
bin/named/include/named/server.h
+6
-0
bin/named/server.c
bin/named/server.c
+13
-0
bin/rndc/rndc.docbook
bin/rndc/rndc.docbook
+11
-0
bin/tests/system/dnstap/clean.sh
bin/tests/system/dnstap/clean.sh
+1
-0
bin/tests/system/dnstap/tests.sh
bin/tests/system/dnstap/tests.sh
+194
-40
configure
configure
+42
-38
configure.in
configure.in
+54
-51
doc/arm/notes.xml
doc/arm/notes.xml
+4
-0
lib/dns/.gitignore
lib/dns/.gitignore
+2
-0
lib/dns/Makefile.in
lib/dns/Makefile.in
+3
-2
lib/dns/dnstap.c
lib/dns/dnstap.c
+53
-2
lib/dns/dnstap.pb-c.c
lib/dns/dnstap.pb-c.c
+0
-523
lib/dns/dnstap.pb-c.h
lib/dns/dnstap.pb-c.h
+0
-343
lib/dns/include/dns/Makefile.in
lib/dns/include/dns/Makefile.in
+2
-2
lib/dns/include/dns/dnstap.h
lib/dns/include/dns/dnstap.h
+9
-12
lib/dns/include/dns/dnstap.pb-c.h
lib/dns/include/dns/dnstap.pb-c.h
+0
-343
No files found.
CHANGES
View file @
7d262a36
4394. [func] Add rndc command "dnstap-reopen" to close and
reopen dnstap output filed. [RT #41803]
4393. [bug] Address potential NULL pointer dereferences in
dnstap code.
...
...
bin/named/control.c
View file @
7d262a36
...
...
@@ -281,6 +281,8 @@ ns_control_docommand(isccc_sexpr_t *message, isc_boolean_t readonly,
result
=
ns_server_testgen
(
lex
,
text
);
}
else
if
(
command_compare
(
command
,
NS_COMMAND_MKEYS
))
{
result
=
ns_server_mkeys
(
ns_g_server
,
lex
,
text
);
}
else
if
(
command_compare
(
command
,
NS_COMMAND_DNSTAPREOPEN
))
{
result
=
ns_server_dnstap_reopen
(
ns_g_server
);
}
else
{
isc_log_write
(
ns_g_lctx
,
NS_LOGCATEGORY_GENERAL
,
NS_LOGMODULE_CONTROL
,
ISC_LOG_WARNING
,
...
...
bin/named/include/named/control.h
View file @
7d262a36
...
...
@@ -72,6 +72,7 @@
#define NS_COMMAND_NTA "nta"
#define NS_COMMAND_TESTGEN "testgen"
#define NS_COMMAND_MKEYS "managed-keys"
#define NS_COMMAND_DNSTAPREOPEN "dnstap-reopen"
isc_result_t
ns_controls_create
(
ns_server_t
*
server
,
ns_controls_t
**
ctrlsp
);
...
...
bin/named/include/named/server.h
View file @
7d262a36
...
...
@@ -745,4 +745,10 @@ ns_server_testgen(isc_lex_t *lex, isc_buffer_t **text);
isc_result_t
ns_server_mkeys
(
ns_server_t
*
server
,
isc_lex_t
*
lex
,
isc_buffer_t
**
text
);
/*%
* Close and reopen DNSTAP output file.
*/
isc_result_t
ns_server_dnstap_reopen
(
ns_server_t
*
server
);
#endif
/* NAMED_SERVER_H */
bin/named/server.c
View file @
7d262a36
...
...
@@ -12189,3 +12189,16 @@ ns_server_mkeys(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
return (result);
}
isc_result_t
ns_server_dnstap_reopen(ns_server_t *server) {
#if HAVE_DNSTAP
if (server->dtenv != NULL)
return(dns_dt_reopen(server->dtenv));
return (ISC_R_NOTFOUND);
#else
UNUSED(server);
return (ISC_R_NOTIMPLEMENTED);
#endif
}
bin/rndc/rndc.docbook
View file @
7d262a36
...
...
@@ -44,6 +44,7 @@
<year>2013</year>
<year>2014</year>
<year>2015</year>
<year>2016</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
<copyright>
...
...
@@ -313,6 +314,16 @@
</listitem>
</varlistentry>
<varlistentry>
<term><userinput>dnstap-reopen</userinput></term>
<listitem>
<para>
Close and re-open DNSTAP output files. This allows the files
to be renamed externally then to be re-opened.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><userinput>dumpdb <optional>-all|-cache|-zone|-adb|-bad|-fail</optional> <optional><replaceable>view ...</replaceable></optional></userinput></term>
<listitem>
...
...
bin/tests/system/dnstap/clean.sh
View file @
7d262a36
...
...
@@ -20,3 +20,4 @@ rm -f */named.stats
rm
-f
dig.out
*
rm
-f
ns
*
/named.lock
rm
-f
ns
*
/dnstap.out
rm
-f
ns
*
/dnstap.out.save
bin/tests/system/dnstap/tests.sh
View file @
7d262a36
...
...
@@ -21,6 +21,18 @@ RNDCCMD="$RNDC -p 9953 -c ../common/rndc.conf"
status
=
0
$DIG
+short @10.53.0.3
-p
5300 a.example
>
dig.out
mv
ns1/dnstap.out ns1/dnstap.out.save
mv
ns2/dnstap.out ns2/dnstap.out.save
mv
ns3/dnstap.out ns3/dnstap.out.save
sleep
2
$RNDCCMD
-s
10.53.0.1 dnstap-reopen |
sed
's/^/I:ns1 /'
$RNDCCMD
-s
10.53.0.2 dnstap-reopen |
sed
's/^/I:ns2 /'
$RNDCCMD
-s
10.53.0.3 dnstap-reopen |
sed
's/^/I:ns3 /'
$DIG
+short @10.53.0.3
-p
5300 a.example
>
dig.out
sleep
1
...
...
@@ -34,34 +46,35 @@ $RNDCCMD -s 10.53.0.2 stop | sed 's/^/I:ns2 /'
$RNDCCMD
-s
10.53.0.3 stop |
sed
's/^/I:ns3 /'
sleep
1
udp1
=
`
$DNSTAPREAD
ns1/dnstap.out |
grep
"UDP "
|
wc
-l
`
tcp1
=
`
$DNSTAPREAD
ns1/dnstap.out |
grep
"TCP "
|
wc
-l
`
aq1
=
`
$DNSTAPREAD
ns1/dnstap.out |
grep
"AQ "
|
wc
-l
`
ar1
=
`
$DNSTAPREAD
ns1/dnstap.out |
grep
"AR "
|
wc
-l
`
cq1
=
`
$DNSTAPREAD
ns1/dnstap.out |
grep
"CQ "
|
wc
-l
`
cr1
=
`
$DNSTAPREAD
ns1/dnstap.out |
grep
"CR "
|
wc
-l
`
rq1
=
`
$DNSTAPREAD
ns1/dnstap.out |
grep
"RQ "
|
wc
-l
`
rr1
=
`
$DNSTAPREAD
ns1/dnstap.out |
grep
"RR "
|
wc
-l
`
udp1
=
`
$DNSTAPREAD
ns1/dnstap.out
.save
|
grep
"UDP "
|
wc
-l
`
tcp1
=
`
$DNSTAPREAD
ns1/dnstap.out
.save
|
grep
"TCP "
|
wc
-l
`
aq1
=
`
$DNSTAPREAD
ns1/dnstap.out
.save
|
grep
"AQ "
|
wc
-l
`
ar1
=
`
$DNSTAPREAD
ns1/dnstap.out
.save
|
grep
"AR "
|
wc
-l
`
cq1
=
`
$DNSTAPREAD
ns1/dnstap.out
.save
|
grep
"CQ "
|
wc
-l
`
cr1
=
`
$DNSTAPREAD
ns1/dnstap.out
.save
|
grep
"CR "
|
wc
-l
`
rq1
=
`
$DNSTAPREAD
ns1/dnstap.out
.save
|
grep
"RQ "
|
wc
-l
`
rr1
=
`
$DNSTAPREAD
ns1/dnstap.out
.save
|
grep
"RR "
|
wc
-l
`
udp2
=
`
$DNSTAPREAD
ns2/dnstap.out |
grep
"UDP "
|
wc
-l
`
tcp2
=
`
$DNSTAPREAD
ns2/dnstap.out |
grep
"TCP "
|
wc
-l
`
aq2
=
`
$DNSTAPREAD
ns2/dnstap.out |
grep
"AQ "
|
wc
-l
`
ar2
=
`
$DNSTAPREAD
ns2/dnstap.out |
grep
"AR "
|
wc
-l
`
cq2
=
`
$DNSTAPREAD
ns2/dnstap.out |
grep
"CQ "
|
wc
-l
`
cr2
=
`
$DNSTAPREAD
ns2/dnstap.out |
grep
"CR "
|
wc
-l
`
rq2
=
`
$DNSTAPREAD
ns2/dnstap.out |
grep
"RQ "
|
wc
-l
`
rr2
=
`
$DNSTAPREAD
ns2/dnstap.out |
grep
"RR "
|
wc
-l
`
udp2
=
`
$DNSTAPREAD
ns2/dnstap.out
.save
|
grep
"UDP "
|
wc
-l
`
tcp2
=
`
$DNSTAPREAD
ns2/dnstap.out
.save
|
grep
"TCP "
|
wc
-l
`
aq2
=
`
$DNSTAPREAD
ns2/dnstap.out
.save
|
grep
"AQ "
|
wc
-l
`
ar2
=
`
$DNSTAPREAD
ns2/dnstap.out
.save
|
grep
"AR "
|
wc
-l
`
cq2
=
`
$DNSTAPREAD
ns2/dnstap.out
.save
|
grep
"CQ "
|
wc
-l
`
cr2
=
`
$DNSTAPREAD
ns2/dnstap.out
.save
|
grep
"CR "
|
wc
-l
`
rq2
=
`
$DNSTAPREAD
ns2/dnstap.out
.save
|
grep
"RQ "
|
wc
-l
`
rr2
=
`
$DNSTAPREAD
ns2/dnstap.out
.save
|
grep
"RR "
|
wc
-l
`
udp3
=
`
$DNSTAPREAD
ns3/dnstap.out |
grep
"UDP "
|
wc
-l
`
tcp3
=
`
$DNSTAPREAD
ns3/dnstap.out |
grep
"TCP "
|
wc
-l
`
aq3
=
`
$DNSTAPREAD
ns3/dnstap.out |
grep
"AQ "
|
wc
-l
`
ar3
=
`
$DNSTAPREAD
ns3/dnstap.out |
grep
"AR "
|
wc
-l
`
cq3
=
`
$DNSTAPREAD
ns3/dnstap.out |
grep
"CQ "
|
wc
-l
`
cr3
=
`
$DNSTAPREAD
ns3/dnstap.out |
grep
"CR "
|
wc
-l
`
rq3
=
`
$DNSTAPREAD
ns3/dnstap.out |
grep
"RQ "
|
wc
-l
`
rr3
=
`
$DNSTAPREAD
ns3/dnstap.out |
grep
"RR "
|
wc
-l
`
udp3
=
`
$DNSTAPREAD
ns3/dnstap.out
.save
|
grep
"UDP "
|
wc
-l
`
tcp3
=
`
$DNSTAPREAD
ns3/dnstap.out
.save
|
grep
"TCP "
|
wc
-l
`
aq3
=
`
$DNSTAPREAD
ns3/dnstap.out
.save
|
grep
"AQ "
|
wc
-l
`
ar3
=
`
$DNSTAPREAD
ns3/dnstap.out
.save
|
grep
"AR "
|
wc
-l
`
cq3
=
`
$DNSTAPREAD
ns3/dnstap.out
.save
|
grep
"CQ "
|
wc
-l
`
cr3
=
`
$DNSTAPREAD
ns3/dnstap.out
.save
|
grep
"CR "
|
wc
-l
`
rq3
=
`
$DNSTAPREAD
ns3/dnstap.out
.save
|
grep
"RQ "
|
wc
-l
`
rr3
=
`
$DNSTAPREAD
ns3/dnstap.out
.save
|
grep
"RR "
|
wc
-l
`
echo
"I:checking UDP message counts"
echo
"I:checking initial message counts"
echo
"I: checking UDP message counts"
ret
=
0
[
$udp1
-eq
0
]
||
{
echo
"ns1
$udp1
expected 0"
;
ret
=
1
...
...
@@ -72,10 +85,10 @@ ret=0
[
$udp3
-eq
4
]
||
{
echo
"ns3
$udp3
expected 4"
;
ret
=
1
}
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
if
[
$ret
!=
0
]
;
then
echo
"I:
failed"
;
fi
status
=
`
expr
$status
+
$ret
`
echo
"I:checking TCP message counts"
echo
"I:
checking TCP message counts"
ret
=
0
[
$tcp1
-eq
6
]
||
{
echo
"ns1
$tcp1
expected 6"
;
ret
=
1
...
...
@@ -86,10 +99,10 @@ ret=0
[
$tcp3
-eq
6
]
||
{
echo
"ns3
$tcp3
expected 6"
;
ret
=
1
}
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
if
[
$ret
!=
0
]
;
then
echo
"I:
failed"
;
fi
status
=
`
expr
$status
+
$ret
`
echo
"I:checking AUTH_QUERY message counts"
echo
"I:
checking AUTH_QUERY message counts"
ret
=
0
[
$aq1
-eq
2
]
||
{
echo
"ns1
$aq1
exepcted 2"
;
ret
=
1
...
...
@@ -100,10 +113,10 @@ ret=0
[
$aq3
-eq
0
]
||
{
echo
"ns3
$aq3
expected 0"
;
ret
=
1
}
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
if
[
$ret
!=
0
]
;
then
echo
"I:
failed"
;
fi
status
=
`
expr
$status
+
$ret
`
echo
"I:checking AUTH_RESPONSE message counts"
echo
"I:
checking AUTH_RESPONSE message counts"
ret
=
0
[
$ar1
-eq
2
]
||
{
echo
"ns1
$ar1
expected 2"
;
ret
=
1
...
...
@@ -114,10 +127,10 @@ ret=0
[
$ar3
-eq
0
]
||
{
echo
"ns3
$ar3
expected 0"
;
ret
=
1
}
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
if
[
$ret
!=
0
]
;
then
echo
"I:
failed"
;
fi
status
=
`
expr
$status
+
$ret
`
echo
"I:checking CLIENT_QUERY message counts"
echo
"I:
checking CLIENT_QUERY message counts"
ret
=
0
[
$cq1
-eq
1
]
||
{
echo
"ns1
$cq1
expected 1"
;
ret
=
1
...
...
@@ -128,10 +141,10 @@ ret=0
[
$cq3
-eq
2
]
||
{
echo
"ns3
$cq3
expected 2"
;
ret
=
1
}
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
if
[
$ret
!=
0
]
;
then
echo
"I:
failed"
;
fi
status
=
`
expr
$status
+
$ret
`
echo
"I:checking CLIENT_RESPONSE message counts"
echo
"I:
checking CLIENT_RESPONSE message counts"
ret
=
0
[
$cr1
-eq
1
]
||
{
echo
"ns1
$cr1
expected 1"
;
ret
=
1
...
...
@@ -142,10 +155,10 @@ ret=0
[
$cr3
-eq
2
]
||
{
echo
"ns3
$cr3
expected 2"
;
ret
=
1
}
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
if
[
$ret
!=
0
]
;
then
echo
"I:
failed"
;
fi
status
=
`
expr
$status
+
$ret
`
echo
"I:checking RESOLVER_QUERY message counts"
echo
"I:
checking RESOLVER_QUERY message counts"
ret
=
0
[
$rq1
-eq
0
]
||
{
echo
"ns1
$rq1
expected 0"
;
ret
=
1
...
...
@@ -156,10 +169,10 @@ ret=0
[
$rq3
-eq
3
]
||
{
echo
"ns3
$rq3
expected 3"
;
ret
=
1
}
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
if
[
$ret
!=
0
]
;
then
echo
"I:
failed"
;
fi
status
=
`
expr
$status
+
$ret
`
echo
"I:checking RESOLVER_RESPONSE message counts"
echo
"I:
checking RESOLVER_RESPONSE message counts"
ret
=
0
[
$rr1
-eq
0
]
||
{
echo
"ns1
$rr1
expected 0"
;
ret
=
1
...
...
@@ -170,7 +183,148 @@ ret=0
[
$rr3
-eq
3
]
||
{
echo
"ns3
$rr3
expected 3"
;
ret
=
1
}
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
if
[
$ret
!=
0
]
;
then
echo
"I: failed"
;
fi
status
=
`
expr
$status
+
$ret
`
udp1
=
`
$DNSTAPREAD
ns1/dnstap.out |
grep
"UDP "
|
wc
-l
`
tcp1
=
`
$DNSTAPREAD
ns1/dnstap.out |
grep
"TCP "
|
wc
-l
`
aq1
=
`
$DNSTAPREAD
ns1/dnstap.out |
grep
"AQ "
|
wc
-l
`
ar1
=
`
$DNSTAPREAD
ns1/dnstap.out |
grep
"AR "
|
wc
-l
`
cq1
=
`
$DNSTAPREAD
ns1/dnstap.out |
grep
"CQ "
|
wc
-l
`
cr1
=
`
$DNSTAPREAD
ns1/dnstap.out |
grep
"CR "
|
wc
-l
`
rq1
=
`
$DNSTAPREAD
ns1/dnstap.out |
grep
"RQ "
|
wc
-l
`
rr1
=
`
$DNSTAPREAD
ns1/dnstap.out |
grep
"RR "
|
wc
-l
`
udp2
=
`
$DNSTAPREAD
ns2/dnstap.out |
grep
"UDP "
|
wc
-l
`
tcp2
=
`
$DNSTAPREAD
ns2/dnstap.out |
grep
"TCP "
|
wc
-l
`
aq2
=
`
$DNSTAPREAD
ns2/dnstap.out |
grep
"AQ "
|
wc
-l
`
ar2
=
`
$DNSTAPREAD
ns2/dnstap.out |
grep
"AR "
|
wc
-l
`
cq2
=
`
$DNSTAPREAD
ns2/dnstap.out |
grep
"CQ "
|
wc
-l
`
cr2
=
`
$DNSTAPREAD
ns2/dnstap.out |
grep
"CR "
|
wc
-l
`
rq2
=
`
$DNSTAPREAD
ns2/dnstap.out |
grep
"RQ "
|
wc
-l
`
rr2
=
`
$DNSTAPREAD
ns2/dnstap.out |
grep
"RR "
|
wc
-l
`
udp3
=
`
$DNSTAPREAD
ns3/dnstap.out |
grep
"UDP "
|
wc
-l
`
tcp3
=
`
$DNSTAPREAD
ns3/dnstap.out |
grep
"TCP "
|
wc
-l
`
aq3
=
`
$DNSTAPREAD
ns3/dnstap.out |
grep
"AQ "
|
wc
-l
`
ar3
=
`
$DNSTAPREAD
ns3/dnstap.out |
grep
"AR "
|
wc
-l
`
cq3
=
`
$DNSTAPREAD
ns3/dnstap.out |
grep
"CQ "
|
wc
-l
`
cr3
=
`
$DNSTAPREAD
ns3/dnstap.out |
grep
"CR "
|
wc
-l
`
rq3
=
`
$DNSTAPREAD
ns3/dnstap.out |
grep
"RQ "
|
wc
-l
`
rr3
=
`
$DNSTAPREAD
ns3/dnstap.out |
grep
"RR "
|
wc
-l
`
echo
"I:checking reopened message counts"
echo
"I: checking UDP message counts"
ret
=
0
[
$udp1
-eq
0
]
||
{
echo
"ns1
$udp1
expected 0"
;
ret
=
1
}
[
$udp2
-eq
0
]
||
{
echo
"ns2
$udp2
expected 0"
;
ret
=
1
}
[
$udp3
-eq
2
]
||
{
echo
"ns3
$udp3
expected 2"
;
ret
=
1
}
if
[
$ret
!=
0
]
;
then
echo
"I: failed"
;
fi
status
=
`
expr
$status
+
$ret
`
echo
"I: checking TCP message counts"
ret
=
0
[
$tcp1
-eq
0
]
||
{
echo
"ns1
$tcp1
expected 0"
;
ret
=
1
}
[
$tcp2
-eq
0
]
||
{
echo
"ns2
$tcp2
expected 0"
;
ret
=
1
}
[
$tcp3
-eq
0
]
||
{
echo
"ns3
$tcp3
expected 0"
;
ret
=
1
}
if
[
$ret
!=
0
]
;
then
echo
"I: failed"
;
fi
status
=
`
expr
$status
+
$ret
`
echo
"I: checking AUTH_QUERY message counts"
ret
=
0
[
$aq1
-eq
0
]
||
{
echo
"ns1
$aq1
exepcted 0"
;
ret
=
1
}
[
$aq2
-eq
0
]
||
{
echo
"ns2
$aq2
expected 0"
;
ret
=
1
}
[
$aq3
-eq
0
]
||
{
echo
"ns3
$aq3
expected 0"
;
ret
=
1
}
if
[
$ret
!=
0
]
;
then
echo
"I: failed"
;
fi
status
=
`
expr
$status
+
$ret
`
echo
"I: checking AUTH_RESPONSE message counts"
ret
=
0
[
$ar1
-eq
0
]
||
{
echo
"ns1
$ar1
expected 0"
;
ret
=
1
}
[
$ar2
-eq
0
]
||
{
echo
"ns2
$ar2
expected 0"
;
ret
=
1
}
[
$ar3
-eq
0
]
||
{
echo
"ns3
$ar3
expected 0"
;
ret
=
1
}
if
[
$ret
!=
0
]
;
then
echo
"I: failed"
;
fi
status
=
`
expr
$status
+
$ret
`
echo
"I: checking CLIENT_QUERY message counts"
ret
=
0
[
$cq1
-eq
0
]
||
{
echo
"ns1
$cq1
expected 0"
;
ret
=
1
}
[
$cq2
-eq
0
]
||
{
echo
"ns2
$cq2
expected 0"
;
ret
=
1
}
[
$cq3
-eq
1
]
||
{
echo
"ns3
$cq3
expected 1"
;
ret
=
1
}
if
[
$ret
!=
0
]
;
then
echo
"I: failed"
;
fi
status
=
`
expr
$status
+
$ret
`
echo
"I: checking CLIENT_RESPONSE message counts"
ret
=
0
[
$cr1
-eq
0
]
||
{
echo
"ns1
$cr1
expected 0"
;
ret
=
1
}
[
$cr2
-eq
0
]
||
{
echo
"ns2
$cr2
expected 0"
;
ret
=
1
}
[
$cr3
-eq
1
]
||
{
echo
"ns3
$cr3
expected 1"
;
ret
=
1
}
if
[
$ret
!=
0
]
;
then
echo
"I: failed"
;
fi
status
=
`
expr
$status
+
$ret
`
echo
"I: checking RESOLVER_QUERY message counts"
ret
=
0
[
$rq1
-eq
0
]
||
{
echo
"ns1
$rq1
expected 0"
;
ret
=
1
}
[
$rq2
-eq
0
]
||
{
echo
"ns2
$rq2
expected 0"
;
ret
=
1
}
[
$rq3
-eq
0
]
||
{
echo
"ns3
$rq3
expected 0"
;
ret
=
1
}
if
[
$ret
!=
0
]
;
then
echo
"I: failed"
;
fi
status
=
`
expr
$status
+
$ret
`
echo
"I: checking RESOLVER_RESPONSE message counts"
ret
=
0
[
$rr1
-eq
0
]
||
{
echo
"ns1
$rr1
expected 0"
;
ret
=
1
}
[
$rr2
-eq
0
]
||
{
echo
"ns2
$rr2
expected 0"
;
ret
=
1
}
[
$rr3
-eq
0
]
||
{
echo
"ns3
$rr3
expected 0"
;
ret
=
1
}
if
[
$ret
!=
0
]
;
then
echo
"I: failed"
;
fi
status
=
`
expr
$status
+
$ret
`
echo
"I:exit status:
$status
"
...
...
configure
View file @
7d262a36
...
...
@@ -705,6 +705,7 @@ W3M
DBLATEX
PDFLATEX
LATEX
DNSTAP_PB_C_H
DNSTAPHTML
DNSTAPMAN
DNSTAPTARGETS
...
...
@@ -20263,11 +20264,12 @@ DNSTAPOBJS=
DNSTAPTARGETS=
DNSTAPMAN=
DNSTAPHTML=
DNSTAP_PB_C_H=
if test "x$use_dnstap" != "xno"; then
if ! $use_threads; then
as_fn_error $? "Dnstap requires threads." "$LINENO" 5
fi
# Extract the first word of "protoc-c", so it can be a program name with args.
if ! $use_threads; then
as_fn_error $? "Dnstap requires threads." "$LINENO" 5
fi
# Extract the first word of "protoc-c", so it can be a program name with args.
set dummy protoc-c; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
...
...
@@ -20307,38 +20309,38 @@ $as_echo "no" >&6; }
fi
if test -z "$PROTOC_C"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The protoc-c program was not found." >&5
if test -z "$PROTOC_C"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The protoc-c program was not found." >&5
$as_echo "$as_me: WARNING: The protoc-c program was not found." >&2;}
fi
fi
# Check whether --with-protobuf-c was given.
if test "${with_protobuf_c+set}" = set; then :
withval=$with_protobuf_c;
# workaround for protobuf-c includes at old dir
# before protobuf-c-1.0.0
if test -f $withval/include/google/protobuf-c/protobuf-c.h
then
CFLAGS="$CFLAGS -I$withval/include/google"
else
CFLAGS="$CFLAGS -I$withval/include"
fi
LDFLAGS="$LDFLAGS -L$withval/lib"
# workaround for protobuf-c includes at old dir
# before protobuf-c-1.0.0
if test -f $withval/include/google/protobuf-c/protobuf-c.h
then
CFLAGS="$CFLAGS -I$withval/include/google"
else
CFLAGS="$CFLAGS -I$withval/include"
fi
LDFLAGS="$LDFLAGS -L$withval/lib"
else
# workaround for protobuf-c includes at old dir
# before protobuf-c-1.0.0
if test -f /usr/include/google/protobuf-c/protobuf-c.h
then
CFLAGS="$CFLAGS -I/usr/include/google"
else
if test -f /usr/local/include/google/protobuf-c/protobuf-c.h
then
CFLAGS="$CFLAGS -I/usr/local/include/google"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
fi
fi
# workaround for protobuf-c includes at old dir
# before protobuf-c-1.0.0
if test -f /usr/include/google/protobuf-c/protobuf-c.h
then
CFLAGS="$CFLAGS -I/usr/include/google"
else
if test -f /usr/local/include/google/protobuf-c/protobuf-c.h
then
CFLAGS="$CFLAGS -I/usr/local/include/google"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
fi
fi
fi
...
...
@@ -20346,13 +20348,13 @@ fi
# Check whether --with-libfstrm was given.
if test "${with_libfstrm+set}" = set; then :
withval=$with_libfstrm;
CFLAGS="$CFLAGS -I$withval/include"
LDFLAGS="$LDFLAGS -L$withval/lib"
CFLAGS="$CFLAGS -I$withval/include"
LDFLAGS="$LDFLAGS -L$withval/lib"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fstrm_iothr_init" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fstrm_iothr_init" >&5
$as_echo_n "checking for library containing fstrm_iothr_init... " >&6; }
if ${ac_cv_search_fstrm_iothr_init+:} false; then :
$as_echo_n "(cached) " >&6
...
...
@@ -20410,7 +20412,7 @@ else
as_fn_error $? "The fstrm library was not found. Please install fstrm!" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing protobuf_c_message_pack" >&5
$as_echo_n "checking for library containing protobuf_c_message_pack... " >&6; }
if ${ac_cv_search_protobuf_c_message_pack+:} false; then :
$as_echo_n "(cached) " >&6
...
...
@@ -20472,12 +20474,13 @@ fi
$as_echo "#define HAVE_DNSTAP 1" >>confdefs.h
DNSTAP=dnstap
DNSTAPSRCS='${DNSTAPSRCS}'
DNSTAPOBJS='${DNSTAPOBJS}'
DNSTAPTARGETS='${DNSTAPTARGETS}'
DNSTAPMAN='${DNSTAPMAN}'
DNSTAPHTML='${DNSTAPHTML}'
DNSTAP=dnstap
DNSTAPSRCS='${DNSTAPSRCS}'
DNSTAPOBJS='${DNSTAPOBJS}'
DNSTAPTARGETS='${DNSTAPTARGETS}'
DNSTAPMAN='${DNSTAPMAN}'
DNSTAPHTML='${DNSTAPHTML}'
DNSTAP_PB_C_H="dnstap.pb-c.h"
fi
...
...
@@ -20486,6 +20489,7 @@ fi
#
# The following sets up how non-blocking i/o is established.
# Sunos, cygwin and solaris 2.x (x<5) require special handling.
...
...
configure.in
View file @
7d262a36
...
...
@@ -4099,58 +4099,60 @@ DNSTAPOBJS=
DNSTAPTARGETS=
DNSTAPMAN=
DNSTAPHTML=
DNSTAP_PB_C_H=
if test "x$use_dnstap" != "xno"; then
if ! $use_threads; then
AC_MSG_ERROR([Dnstap requires threads.])
fi
AC_PATH_PROG([PROTOC_C], [protoc-c])
if test -z "$PROTOC_C"; then
AC_MSG_WARN([The protoc-c program was not found.])
fi
AC_ARG_WITH([protobuf-c],
AC_HELP_STRING([--with-protobuf-c=path],
[Path where protobuf-c is installed, for dnstap]), [
# workaround for protobuf-c includes at old dir
# before protobuf-c-1.0.0
if test -f $withval/include/google/protobuf-c/protobuf-c.h
then
CFLAGS="$CFLAGS -I$withval/include/google"
else
CFLAGS="$CFLAGS -I$withval/include"
fi
LDFLAGS="$LDFLAGS -L$withval/lib"
], [
# workaround for protobuf-c includes at old dir
# before protobuf-c-1.0.0
if test -f /usr/include/google/protobuf-c/protobuf-c.h
then
CFLAGS="$CFLAGS -I/usr/include/google"
else
if test -f /usr/local/include/google/protobuf-c/protobuf-c.h
then
CFLAGS="$CFLAGS -I/usr/local/include/google"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
fi
fi
])
AC_ARG_WITH([libfstrm], AC_HELP_STRING([--with-libfstrm=path],
[Path where libfstrm is installed, for dnstap]), [
CFLAGS="$CFLAGS -I$withval/include"
LDFLAGS="$LDFLAGS -L$withval/lib"
])
AC_SEARCH_LIBS([fstrm_iothr_init], [fstrm], [],
AC_MSG_ERROR([The fstrm library was not found. Please install fstrm!]))
AC_SEARCH_LIBS([protobuf_c_message_pack], [protobuf-c], [],
AC_MSG_ERROR([The protobuf-c library was not found. Please install protobuf-c!]))
AC_DEFINE(HAVE_DNSTAP, 1, [Define to 1 to enable dnstap support])
DNSTAP=dnstap
DNSTAPSRCS='${DNSTAPSRCS}'
DNSTAPOBJS='${DNSTAPOBJS}'
DNSTAPTARGETS='${DNSTAPTARGETS}'
DNSTAPMAN='${DNSTAPMAN}'
DNSTAPHTML='${DNSTAPHTML}'
if ! $use_threads; then
AC_MSG_ERROR([Dnstap requires threads.])
fi
AC_PATH_PROG([PROTOC_C], [protoc-c])
if test -z "$PROTOC_C"; then
AC_MSG_WARN([The protoc-c program was not found.])
fi
AC_ARG_WITH([protobuf-c],
AC_HELP_STRING([--with-protobuf-c=path],
[Path where protobuf-c is installed, for dnstap]), [
# workaround for protobuf-c includes at old dir
# before protobuf-c-1.0.0
if test -f $withval/include/google/protobuf-c/protobuf-c.h
then
CFLAGS="$CFLAGS -I$withval/include/google"
else
CFLAGS="$CFLAGS -I$withval/include"
fi
LDFLAGS="$LDFLAGS -L$withval/lib"
], [
# workaround for protobuf-c includes at old dir
# before protobuf-c-1.0.0
if test -f /usr/include/google/protobuf-c/protobuf-c.h