Merge pull request #42931 from thaJeztah/dont_panic_on_resolv

libnetwork: ServeDNS(): don't panic on unsupported query types
This commit is contained in:
Sebastiaan van Stijn 2021-10-15 12:45:31 +02:00 committed by GitHub
commit 3e152513b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -384,7 +384,8 @@ func (r *resolver) ServeDNS(w dns.ResponseWriter, query *dns.Msg) {
case dns.TypeSRV:
resp, err = r.handleSRVQuery(name, query)
default:
panic("error")
queryType := dns.TypeToString[query.Question[0].Qtype]
logrus.Debugf("[resolver] query type %s is not supported by the embedded DNS and will be forwarded to external DNS", queryType)
}
if err != nil {