More small cleanup.

This commit is contained in:
Seth Hall 2011-05-02 11:41:38 -04:00
parent 7fc195e82e
commit ebf907fa33
4 changed files with 6 additions and 3 deletions

View file

@ -15,6 +15,7 @@ export {
qtype_name: string &log &optional; qtype_name: string &log &optional;
qclass: count &log &optional; qclass: count &log &optional;
rcode: count &log &optional; rcode: count &log &optional;
rcode_name: string &log &optional;
QR: bool &log &default=F; QR: bool &log &default=F;
Z: bool &log &default=F; Z: bool &log &default=F;
AA: bool &log &default=F; AA: bool &log &default=F;
@ -93,6 +94,7 @@ function set_session(c: connection, msg: dns_msg, is_query: bool)
c$dns_state$last_active=network_time(); c$dns_state$last_active=network_time();
c$dns$rcode = msg$rcode; c$dns$rcode = msg$rcode;
c$dns$rcode_name = base_errors[msg$rcode];
if ( ! is_query ) if ( ! is_query )
{ {

View file

@ -65,7 +65,7 @@ export {
[22] = "BADTRUNC", ##< draft-ietf-dnsext-tsig-sha-05.txt [22] = "BADTRUNC", ##< draft-ietf-dnsext-tsig-sha-05.txt
[3842] = "BADSIG", ##< 16 <= number collision with EDNS(16); [3842] = "BADSIG", ##< 16 <= number collision with EDNS(16);
##< this is a translation from TSIG(16) ##< this is a translation from TSIG(16)
} &default="?"; } &default = function(n: count): string { return fmt("rcode-%d", n); };
# This deciphers EDNS Z field values. # This deciphers EDNS Z field values.
const edns_zfield = { const edns_zfield = {

View file

@ -14,8 +14,8 @@ export {
event bro_init() event bro_init()
{ {
Log::add_filter(DNS, [ Log::add_filter(DNS, [
$name="passive-replication", $name="dns-passive-replication",
$path="passive-replication", $path="dns-passive-replication",
$pred=function(rec: DNS::Info): bool $pred=function(rec: DNS::Info): bool
{ {
if ( rec?$query && rec$query !in recent_requests ) if ( rec?$query && rec$query !in recent_requests )

View file

@ -1,5 +1,6 @@
## A few predefined notice_action_filters (see notice.bro). ## A few predefined notice_action_filters (see notice.bro).
@load notice @load notice
@load functions
module Notice; module Notice;