Cosmetic changes

This commit is contained in:
john 2019-11-30 14:32:12 -05:00
parent fc53f0839b
commit fc049c2fcf
3 changed files with 5 additions and 9 deletions

View File

@ -3,7 +3,7 @@ libsDir := $(baseDir)/libs
projectName := ban2fail
versions := debug release
cc_exe := ban2fail
#install_dir := /usr/local/bin
install_dir := /usr/local/bin
########################################

View File

@ -88,7 +88,7 @@ struct Global G= {
.version= {
.major= 0,
.minor= 12,
.patch= 2
.patch= 3
},
.bitTuples.flags= GlobalFlagBitTuples
@ -425,7 +425,7 @@ main(int argc, char **argv)
/* Special processing for DNS lookups */
if(G.flags & GLB_DNS_LOOKUP_FLG) {
ez_fprintf(G.listing_fh, "Performing reverse DNS lookups for up to %d seconds ...\n", DFLT_DNS_PAUSE_SEC);
ez_fprintf(G.listing_fh, "Performing DNS lookups for up to %d seconds ...\n", DFLT_DNS_PAUSE_SEC);
fflush(G.listing_fh);
int rc= PDNS_lookup(S.lePtrArr, nItems, DFLT_DNS_PAUSE_SEC*1000);
@ -467,7 +467,6 @@ main(int argc, char **argv)
/* Print out only for list option */
if(G.flags & GLB_LIST_ADDR_FLG) {
// const static char *dns_fmt= "%-15s\t%5u/%-4d offenses %s (%s) %s%s %d\n",
const static char *dns_fmt= "%-15s\t%5u/%-4d offenses %s (%s) %s%s\n",
*fmt= "%-15s\t%5u/%-4d offenses %s (%s)\n";

7
pdns.c
View File

@ -378,13 +378,11 @@ worker_check_inbox_f(void *vp_ndx, int signo)
{
assert(msg.e);
int64_t ms= clock_gettime_ms(CLOCK_REALTIME) - S.start_ms;
//eprintf("thread %u doing lookup at %f seconds", ndx, (double)ms/1000.);
if(msg.e->dns.flags & PDNS_REV_DNS_FLG) {
const static struct addrinfo hints= {
.ai_family = AF_UNSPEC, /* Allow IPv4 or IPv6 */
// .ai_flags = AI_CANONNAME /* get the forward lookup result */
};
/* Get a populated addrinfo object */
@ -395,7 +393,6 @@ worker_check_inbox_f(void *vp_ndx, int signo)
switch(rc) {
case 0:
// assert(res && res->ai_canonname);
break;
case EAI_NONAME:
@ -441,12 +438,12 @@ worker_check_inbox_f(void *vp_ndx, int signo)
break;
case EAI_NONAME:
msg.e->dns.name= "[3(NXDOMAIN)]";
msg.e->dns.name= "3(NXDOMAIN)";
msg.e->dns.flags |= PDNS_NXDOMAIN_FLG;
break;
case EAI_AGAIN:
msg.e->dns.name= "[2(SERVFAIL)]";
msg.e->dns.name= "2(SERVFAIL)";
msg.e->dns.flags |= PDNS_SERVFAIL_FLG;
break;