shawn1m / overture

A customized DNS relay server
MIT License
1.79k stars 284 forks source link

fix hosts #240

Closed wzv5 closed 4 years ago

wzv5 commented 4 years ago

When hosts exist but query type do not match, an empty result should be returned.

codecov[bot] commented 4 years ago

Codecov Report

Merging #240 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #240   +/-   ##
=======================================
  Coverage   49.84%   49.84%           
=======================================
  Files          13       13           
  Lines         660      660           
=======================================
  Hits          329      329           
  Misses        283      283           
  Partials       48       48           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d5c127b...8b05e38. Read the comment docs.

shawn1m commented 4 years ago

I think your method might be one of the hosts matching strategies so providing an option is preferred for the needs of various users.

wzv5 commented 4 years ago

But as you can see, all systems behave like this. I don't think it needs an option.

shawn1m commented 4 years ago

I don't have IPv6 testing environment for now and I will appreciate it that you could find an example and verify it for me if possible. Thanks a lot!

wzv5 commented 4 years ago

https://github.com/coredns/coredns/blob/9230e1772bc24faddd94a3dc9be7fe52a4d29e83/plugin/hosts/hosts.go#L56-L64

shawn1m commented 4 years ago

Understood. Making overture work like coredns is acceptable. Merged. Thanks!