Skip to content

Commit 5e140ff

Browse files
committed
dnsutil: rmv trailing dot in mdns query extraction
1 parent efa542a commit 5e140ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

intra/xdns/dnsutil.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -997,10 +997,10 @@ func extractMDNSDomain(qname string) (svc, tld string) {
997997
tldarpa6 := strings.LastIndex(qname, arpa6suffix)
998998
tldlocal := strings.LastIndex(qname, localsuffix)
999999
if tldlocal > 0 {
1000-
svc = qname[:tldlocal]
1000+
svc = qname[:tldlocal-1] // remove trailing dot
10011001
tld = localsuffix
10021002
} else if tldarpa4 > 0 {
1003-
svc = qname[:tldarpa4]
1003+
svc = qname[:tldarpa4-1] // remove trailing dot
10041004
tld = arpa4suffix
10051005
} else if tldarpa6 > 0 {
10061006
// 1.1.1.1.a.e.f.ip6.arpa. -> a.e.f.ip6.arpa

0 commit comments

Comments
 (0)