Permalink
Browse files

tweaked dns counting between prints and reset to 0 after each print_p…

…asset.
  • Loading branch information...
1 parent 8a59ef9 commit e810e63310f1078ca72e0300a335928d7f4b4b43 gamelinux committed Mar 12, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/dns.c
View
@@ -491,6 +491,7 @@ void associated_lookup_or_make_insert(pdns_record *lname_node, packetinfo *pi, u
dlog("[*] DNS asset updated...\n");
if ((passet->last_seen - passet->last_print) >= config.dnsprinttime) {
print_passet(passet, lname_node);
+ passet->seen = 0;
}
return;
}
@@ -511,7 +512,7 @@ void associated_lookup_or_make_insert(pdns_record *lname_node, packetinfo *pi, u
prr->_rr_type = rr->_rr_type;
prr->_rr_class = rr->_rr_class;
prr->_rdata_fields = rr->_rdata_fields;
- passet->seen++;
+ passet->seen = 1;
passet->rr = prr;
} else {
dlog("[D] BAD\n");
@@ -540,6 +541,7 @@ void associated_lookup_or_make_insert(pdns_record *lname_node, packetinfo *pi, u
lname_node->passet = passet;
print_passet(passet, lname_node);
+ passet->seen = 0;
return;
}

0 comments on commit e810e63

Please sign in to comment.