core: compute the len for dns srv name

- fixes dns srv for cache, reported by Rob Eijgenraam, FS#426