mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add a check for invalid/junk messages
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
This commit is contained in:
parent
4cb61841e4
commit
2fb14185cb
1 changed files with 3 additions and 0 deletions
|
@ -200,6 +200,9 @@ func (r *resolver) ServeDNS(w dns.ResponseWriter, query *dns.Msg) {
|
|||
err error
|
||||
)
|
||||
|
||||
if query == nil || len(query.Question) == 0 {
|
||||
return
|
||||
}
|
||||
name := query.Question[0].Name
|
||||
if query.Question[0].Qtype == dns.TypeA {
|
||||
resp, err = r.handleIPv4Query(name, query)
|
||||
|
|
Loading…
Reference in a new issue