diff --git a/_examples/funkensturm/funkensturm.go b/_examples/funkensturm/funkensturm.go index 1308d6e1..fdecc2a4 100644 --- a/_examples/funkensturm/funkensturm.go +++ b/_examples/funkensturm/funkensturm.go @@ -172,8 +172,10 @@ func replyTCP(c *net.TCPConn, a net.Addr, i *dns.Msg) { // TODO IPv6 func splitAddrPort(s string) (a, p string) { items := strings.Split(s, ":", 2) - a = items[0] - p = items[1] + a = items[0] + if len(items) > 2 { + p = items[1] + } return }