Support outgoing zone transfers
These can be enabled by adding "transfer out" to the Corefile. Without it no AXFR is allowed. For now only AXFR and no IXFR. No TSIG and no ACLs.
This commit is contained in:
parent
6324bb1fa7
commit
e56d206542
10 changed files with 195 additions and 27 deletions
21
middleware/file/tree/all.go
Normal file
21
middleware/file/tree/all.go
Normal file
|
@ -0,0 +1,21 @@
|
|||
package tree
|
||||
|
||||
// All traverses tree and returns all elements
|
||||
func (t *Tree) All() []*Elem {
|
||||
if t.Root == nil {
|
||||
return nil
|
||||
}
|
||||
found := t.Root.all(nil)
|
||||
return found
|
||||
}
|
||||
|
||||
func (n *Node) all(found []*Elem) []*Elem {
|
||||
if n.Left != nil {
|
||||
found = n.Left.all(found)
|
||||
}
|
||||
found = append(found, n.Elem)
|
||||
if n.Right != nil {
|
||||
found = n.Right.all(found)
|
||||
}
|
||||
return found
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue