Test and fix notify

More tests and add RemoteAddr to State, prolly LocalAddr will be

useful as well.

Fixed and tested IsNotify method.
This commit is contained in:
Miek Gieben
2016-04-07 07:42:58 +01:00
parent 225cdd1ca3
commit e4c72719bf
5 changed files with 104 additions and 56 deletions

View File

@@ -19,7 +19,7 @@ func (z *Zone) isNotify(state middleware.State) bool {
if len(z.TransferFrom) == 0 {
return false
}
remote := middleware.Addr(state.IP()).Normalize()
remote := state.RemoteAddr()
for _, from := range z.TransferFrom {
if from == remote {
return true