]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix unbound-control and ipv6 only.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 13 Dec 2016 14:21:15 +0000 (14:21 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 13 Dec 2016 14:21:15 +0000 (14:21 +0000)
git-svn-id: file:///svn/unbound/trunk@3962 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
smallapp/unbound-control.c

index 35024a3cb3f84dd5af768868c89ca20ad8b29bd5..b46a396d4c5e5be1ca3e46fa3f54d5768068061b 100644 (file)
@@ -1,5 +1,6 @@
 13 December 2016: Wouter
        - Fix #1182: Fix Resource leak (socket), at startup.
+       - Fix unbound-control and ipv6 only.
 
 9 December 2016: Wouter
        - Fix #1176: stack size too small for Alpine Linux.
index 20a7c16499a7fb709320f4d569777aca8431e6a6..866674d2e612af65487b943d7be47d4816695313 100644 (file)
@@ -195,9 +195,13 @@ contact_server(const char* svr, struct config_file* cfg, int statuscmd)
        int fd;
        /* use svr or the first config entry */
        if(!svr) {
-               if(cfg->control_ifs)
+               if(cfg->control_ifs) {
                        svr = cfg->control_ifs->str;
-               else    svr = "127.0.0.1";
+               } else if(cfg->do_ip4) {
+                       svr = "127.0.0.1";
+               } else {
+                       svr = "::1";
+               }
                /* config 0 addr (everything), means ask localhost */
                if(strcmp(svr, "0.0.0.0") == 0)
                        svr = "127.0.0.1";