Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wildcard match pattern is confusing #349

Open
nearbyfly opened this issue Mar 29, 2019 · 0 comments
Open

wildcard match pattern is confusing #349

nearbyfly opened this issue Mar 29, 2019 · 0 comments

Comments

@nearbyfly
Copy link

nearbyfly commented Mar 29, 2019

Hi,

In below example, for dns A query my.abc.tas01.local the result count is 3. From source code match string is "/skydns/local/tas01/abc/my". So it matches domain as "*.my*.abc.tas01.local." Is that expected?

Another confusion is if query with "*.my.abc.tas01.local", the result count is only 1.

####etcd dump
/skydns/local/tas01/abc/my/3
{"host":"169.254.8.113","port":52027}
/skydns/local/tas01/abc/my1/4
{"host":"169.254.8.114","port":52027}
/skydns/local/tas01/abc/myx/4
{"host":"169.254.8.117","port":52027}

####query with wildcard
dig +time=60 @11.0.0.11 -p 15353 my.abc.tas01.local.

; <<>> DiG 9.11.3-1ubuntu1.5-Ubuntu <<>> +time=60 @11.0.0.11 -p 15353 my.abc.tas01.local.
; (1 server found)
;; global options: +cmd
;; Got answer:
;; WARNING: .local is reserved for Multicast DNS
;; You are currently testing what happens when an mDNS query is leaked to DNS
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25526
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;my.abc.tas01.local. IN A

;; ANSWER SECTION:
my.abc.tas01.local. 3600 IN A 169.254.8.114
my.abc.tas01.local. 3600 IN A 169.254.8.117
my.abc.tas01.local. 3600 IN A 169.254.8.113

;; Query time: 2 msec
;; SERVER: 11.0.0.11#15353(11.0.0.11)
;; WHEN: Fri Mar 29 16:21:38 CST 2019
;; MSG SIZE rcvd: 84

####query wildcard explicitly
dig +time=60 @11.0.0.11 -p 15353 *.my.abc.tas01.local.

; <<>> DiG 9.11.3-1ubuntu1.5-Ubuntu <<>> +time=60 @11.0.0.11 -p 15353 *.my.abc.tas01.local.
; (1 server found)
;; global options: +cmd
;; Got answer:
;; WARNING: .local is reserved for Multicast DNS
;; You are currently testing what happens when an mDNS query is leaked to DNS
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31314
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;*.my.abc.tas01.local. IN A

;; ANSWER SECTION:
*.my.abc.tas01.local. 3600 IN A 169.254.8.113

;; Query time: 9 msec
;; SERVER: 11.0.0.11#15353(11.0.0.11)
;; WHEN: Fri Mar 29 16:30:45 CST 2019
;; MSG SIZE rcvd: 54

Thanks,
Neil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant