Fixes a panic in the DNS resolver
Fixes a panic in the DNS resolver

Under certain conditions it appears that the DNS response and returned
error can be nil. When this happens, checking resp.Truncated results in
a nil panic so we must first check that the response is not nil before
checking if a truncated response was received.

See moby/moby#40715

Signed-off-by: Sam Whited <f16bed56189e249fe4ca8ed10a1ecae60e8ceac0@samwhited.com>

trebonian/docker,jimjag/docker,Ramzec/docker,Mokolea/docker,moby/moby,paralin/docker,konstruktoid/docker-upstream,konstruktoid/docker-upstream,jthelin/docker,Ramzec/docker,Mokolea/docker,nalind/docker,AkihiroSuda/docker,bearstech/moby,flavio/docker,jameszhan/docker,mahak/docker,cpuguy83/docker,mahak/docker,moul/docker,nawawi/docker,nalind/docker,AkihiroSuda/docker,gnailuy/docker,docker/docker,trebonian/docker,thaJeztah/docker,vdemeester/docker,jameszhan/docker,jimjag/docker,docker/docker,nawawi/docker,nawawi/docker,djs55/docker,jameszhan/docker,konstruktoid/docker-upstream,paralin/docker,Mokolea/docker,konstruktoid/docker-upstream,moul/docker,flavio/docker,docker/docker,moul/docker,nalind/docker,nawawi/docker,cpuguy83/docker,bearstech/moby,AkihiroSuda/docker,vdemeester/docker,flavio/docker,yosifkit/docker,yosifkit/docker,thaJeztah/docker,Ramzec/docker,paralin/docker,yosifkit/docker,cpuguy83/docker,thaJeztah/docker,flavio/docker,cpuguy83/docker,djs55/docker,Ramzec/docker,bearstech/moby,jimjag/docker,moby/moby,trebonian/docker,bearstech/moby,mahak/docker,djs55/docker,thaJeztah/docker,gnailuy/docker,nalind/docker,moby/moby,paralin/docker,moul/docker,trebonian/docker,vdemeester/docker,gnailuy/docker,Mokolea/docker,jimjag/docker,AkihiroSuda/docker,mahak/docker,jthelin/docker,yosifkit/docker,moby/moby,gnailuy/docker