diff --git a/doc/Changelog b/doc/Changelog index 35024a3cb..b46a396d4 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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. diff --git a/smallapp/unbound-control.c b/smallapp/unbound-control.c index 20a7c1649..866674d2e 100644 --- a/smallapp/unbound-control.c +++ b/smallapp/unbound-control.c @@ -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";