mirror of
https://github.com/coredns/coredns.git
synced 2026-02-17 04:33:10 -05:00
fix(kubernetes): panic on empty ListenHosts (#7857)
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
func boundIPs(c *caddy.Controller) (ips []net.IP) {
|
||||
conf := dnsserver.GetConfig(c)
|
||||
hosts := conf.ListenHosts
|
||||
if hosts == nil || hosts[0] == "" {
|
||||
if len(hosts) == 0 || hosts[0] == "" {
|
||||
hosts = nil
|
||||
addrs, err := net.InterfaceAddrs()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user