diff --git a/cmd/serf/command/agent/command.go b/cmd/serf/command/agent/command.go index e8b7b60dd..ef314e3db 100644 --- a/cmd/serf/command/agent/command.go +++ b/cmd/serf/command/agent/command.go @@ -454,9 +454,9 @@ func (c *Command) startAgent(config *Config, agent *Agent, // Get the bind interface if any iface, _ := config.MDNSNetworkInterface() - - c.logger.Printf("[INFO] agent: Starting mDNS listener on interface %s", iface.Name) - + if iface != nil { + c.logger.Printf("[INFO] agent: Starting mDNS listener on interface %s", iface.Name) + } _, err := NewAgentMDNS(agent, logOutput, config.ReplayOnJoin, config.NodeName, config.Discover, iface, local.Addr, int(local.Port), config.MDNS) if err != nil {