chiark / gitweb /
adnsresfilter: Honour --checkc-freq and --checkc-entex
[adns.git] / client / adnsresfilter.c
index 770af173169abc589897371ef9ff1de441f848b7..2303f6fe22bc46020591c62e7f9bfbc6ae5281d6 100644 (file)
@@ -4,7 +4,7 @@
  */
 /*
  *  This file is part of adns, which is
- *    Copyright (C) 1997-2000,2003,2006,2014  Ian Jackson
+ *    Copyright (C) 1997-2000,2003,2006,2014-2016,2020  Ian Jackson
  *    Copyright (C) 2014  Mark Wooding
  *    Copyright (C) 1999-2000,2003,2006  Tony Finch
  *    Copyright (C) 1991 Massachusetts Institute of Technology
@@ -67,7 +67,7 @@ static int peroutqueuenode, outqueuelen;
 static struct sockaddr_in sa;
 static adns_state ads;
 
-static char addrtextbuf[14];
+static char addrtextbuf[18]; /* [ddd.ddd.ddd.ddd] + nul */
 static int cbyte, inbyte, inbuf;
 static unsigned char bytes[4];
 static struct timeval printbefore;
@@ -171,6 +171,10 @@ static void parseargs(const char *const *argv) {
        config_text= arg;
       } else if (!strcmp(arg,"--debug")) {
        initflags |= adns_if_debug;
+      } else if (!strcmp(arg,"--checkc-freq")) {
+       initflags |= adns_if_checkc_freq;
+      } else if (!strcmp(arg,"--checkc-entex")) {
+       initflags |= adns_if_checkc_entex;
       } else if (!strcmp(arg,"--help")) {
        usage(); quitnow(0);
       } else if (!strcmp(arg,"--version")) {