]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- unbound-control list_insecure command shows the negative trust
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 7 Apr 2015 13:50:09 +0000 (13:50 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 7 Apr 2015 13:50:09 +0000 (13:50 +0000)
  anchors currently configured, patch from Jelte Jansen.

git-svn-id: file:///svn/unbound/trunk@3389 be551aaa-1e26-0410-a405-d3ace91eadb9

daemon/remote.c
doc/Changelog
doc/unbound-control.8.in
smallapp/unbound-control.c

index 24008bf17397dad56478fc1be73e459f0a014436..7b09c03a0c97259d324deb46cf55df374d33e8fe 100644 (file)
@@ -1892,6 +1892,21 @@ do_insecure_remove(SSL* ssl, struct worker* worker, char* arg)
        send_ok(ssl);
 }
 
+static void
+do_insecure_list(SSL* ssl, struct worker* worker)
+{
+       char buf[257];
+       struct trust_anchor* a;
+       if(worker->env.anchors) {
+               RBTREE_FOR(a, struct trust_anchor*, worker->env.anchors->tree) {
+                       if(a->numDS == 0 && a->numDNSKEY == 0) {
+                               dname_str(a->name, buf);
+                               ssl_printf(ssl, "%s\n", buf);
+                       }
+               }
+       }
+}
+
 /** do the status command */
 static void
 do_status(SSL* ssl, struct worker* worker)
@@ -2312,6 +2327,9 @@ execute_cmd(struct daemon_remote* rc, SSL* ssl, char* cmd,
        } else if(cmdcmp(p, "list_stubs", 10)) {
                do_list_stubs(ssl, worker);
                return;
+       } else if(cmdcmp(p, "list_insecure", 13)) {
+               do_insecure_list(ssl, worker);
+               return;
        } else if(cmdcmp(p, "list_local_zones", 16)) {
                do_list_local_zones(ssl, worker);
                return;
index 9c99baaa1e6a75a474c88fc86586691a29d5517a..20dc5ad1c815d7cecb3a085cec7bf1b5377b1987 100644 (file)
@@ -6,6 +6,8 @@
          The file has to be writable to notice the trust anchor change,
          without it, a trust anchor change will be unnoticed and the system
          will then become inoperable.
+       - unbound-control list_insecure command shows the negative trust
+         anchors currently configured, patch from Jelte Jansen.
 
 2 April 2015: Wouter
        - Fix #660: Fix interface-automatic broken in the presence of
index 259eee1d09604b19d2f0647d636554100b22e4fd..6a2c177e49bc8da017713a71abb5ac307a9e9c85 100644 (file)
@@ -197,6 +197,9 @@ This includes the root hints in use.
 .B list_forwards
 List the forward zones in use.  These are printed zone by zone to the output.
 .TP
+.B list_insecure
+List the zones with domain\-insecure.
+.TP
 .B list_local_zones
 List the local zones in use.  These are printed one per line with zone type.
 .TP
index 3b47d3bf885af625f43e98609fa0776b517cd5a6..29530d4f6c930a3683653d46d380233f870ae4d4 100644 (file)
@@ -109,6 +109,7 @@ usage()
        printf("  get_option opt                get option value\n");
        printf("  list_stubs                    list stub-zones and root hints in use\n");
        printf("  list_forwards                 list forward-zones in use\n");
+       printf("  list_insecure                 list domain-insecure zones\n");
        printf("  list_local_zones              list local-zones in use\n");
        printf("  list_local_data               list local-data RRs in use\n");
        printf("  insecure_add zone             add domain-insecure zone\n");