Stub forward/proxy tests (#108)
Test the handling of EDNS0 payloads and forwarding to stubzones servers.
This commit is contained in:
parent
9f651a397b
commit
27ff83e70f
9 changed files with 144 additions and 186 deletions
|
@ -22,6 +22,7 @@ func (e Etcd) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (i
|
|||
name := state.Name()
|
||||
if e.Stubmap != nil && len(*e.Stubmap) > 0 {
|
||||
for zone, _ := range *e.Stubmap {
|
||||
// TODO(miek): use the Match function.
|
||||
if strings.HasSuffix(name, zone) {
|
||||
stub := Stub{Etcd: e, Zone: zone}
|
||||
return stub.ServeDNS(ctx, w, r)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue