mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04:00
middleware/secondary: multiple fixes (#745)
Fix transferring the zone from a master and the matching of notifies to source and dst IP addresses. Add `upstream` keyword as well, because it is needed for the same reasons as in the *file* middlware. Add some dire warning about upstream in the readme of both middlewares. Out of band testing, hidden by net build tag was added. Integration testing still needs to be setup.
This commit is contained in:
@@ -26,19 +26,19 @@ Transfer:
|
||||
t := new(dns.Transfer)
|
||||
c, err := t.In(m, tr)
|
||||
if err != nil {
|
||||
log.Printf("[ERROR] Failed to setup transfer `%s' with `%s': %v", z.origin, tr, err)
|
||||
log.Printf("[ERROR] Failed to setup transfer `%s' with `%q': %v", z.origin, tr, err)
|
||||
Err = err
|
||||
continue Transfer
|
||||
}
|
||||
for env := range c {
|
||||
if env.Error != nil {
|
||||
log.Printf("[ERROR] Failed to parse transfer `%s': %v", z.origin, env.Error)
|
||||
log.Printf("[ERROR] Failed to transfer `%s' from %q: %v", z.origin, tr, env.Error)
|
||||
Err = env.Error
|
||||
continue Transfer
|
||||
}
|
||||
for _, rr := range env.RR {
|
||||
if err := z1.Insert(rr); err != nil {
|
||||
log.Printf("[ERROR] Failed to parse transfer `%s': %v", z.origin, err)
|
||||
log.Printf("[ERROR] Failed to parse transfer `%s' from: %q: %v", z.origin, tr, err)
|
||||
Err = err
|
||||
continue Transfer
|
||||
}
|
||||
@@ -48,7 +48,6 @@ Transfer:
|
||||
break
|
||||
}
|
||||
if Err != nil {
|
||||
log.Printf("[ERROR] Failed to transfer %s: %s", z.origin, Err)
|
||||
return Err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user