summaryrefslogtreecommitdiff
path: root/plugin/rtest/rtest.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/rtest/rtest.go')
-rw-r--r--plugin/rtest/rtest.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/rtest/rtest.go b/plugin/rtest/rtest.go
index a4cae08..f9eed78 100644
--- a/plugin/rtest/rtest.go
+++ b/plugin/rtest/rtest.go
@@ -27,7 +27,7 @@ func (r Rtest) ServeDNS(ctx context.Context, writer dns.ResponseWriter, msg *dns
q := strings.ToLower(state.QName())
qlist := strings.Split(q, ".")
// 符合要求的域名
- if len(qlist) >= 4 {
+ if len(qlist) >= 5 && strings.ContainsAny(qlist[len(qlist)-5], "-") {
// 1.入口
iaddr := strings.ReplaceAll(qlist[len(qlist)-5], "-", ":")
// 2.出口