]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- unbound-control dump_infra prints port number for address if not 53.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 26 Jun 2017 12:31:49 +0000 (12:31 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 26 Jun 2017 12:31:49 +0000 (12:31 +0000)
git-svn-id: file:///svn/unbound/trunk@4248 be551aaa-1e26-0410-a405-d3ace91eadb9

daemon/remote.c
doc/Changelog

index bb41cc5df2dbb748e6ceb63de354dd249b537c1a..fbfe1a1b790425c6c5e5d8e02a7736361fd85c92 100644 (file)
@@ -2389,10 +2389,16 @@ dump_infra_host(struct lruhash_entry* e, void* arg)
        struct infra_data* d = (struct infra_data*)e->data;
        char ip_str[1024];
        char name[257];
+       int port;
        if(a->ssl_failed)
                return;
        addr_to_str(&k->addr, k->addrlen, ip_str, sizeof(ip_str));
        dname_str(k->zonename, name);
+       port = (int)ntohs(((struct sockaddr_in*)&k->addr)->sin_port);
+       if(port != UNBOUND_DNS_PORT) {
+               snprintf(ip_str+strlen(ip_str), sizeof(ip_str)-strlen(ip_str),
+                       "@%d", port);
+       }
        /* skip expired stuff (only backed off) */
        if(d->ttl < a->now) {
                if(d->rtt.rto >= USEFUL_SERVER_TOP_TIMEOUT) {
index 95f197c0f808f0df81957c36170eae8cea2f559b..f0c0fdbda5da626456adfc0f758f332ee5404732 100644 (file)
@@ -1,6 +1,7 @@
 26 June 2017: Wouter
        - Better fixup of dnscrypt_cert_chacha test for different escapes.
        - First fix for zero b64 and hex text zone format in sldns.
+       - unbound-control dump_infra prints port number for address if not 53.
 
 23 June 2017: Wouter
        - (for 1.6.5): fixup of dnscrypt_cert_chacha test (from Manu Bretelle).