(dstIP interface{})
| 282 | } |
| 283 | |
| 284 | func (o *Operator) ipNetCmp(dstIP interface{}) bool { |
| 285 | o.RLock() |
| 286 | defer o.RUnlock() |
| 287 | |
| 288 | for host, netMask := range o.lists { |
| 289 | n := netMask.(*net.IPNet) |
| 290 | if n.Contains(dstIP.(net.IP)) { |
| 291 | log.Debug("%s: %s, %s", log.Red("Net list match"), dstIP, host) |
| 292 | return true |
| 293 | } |
| 294 | } |
| 295 | return false |
| 296 | } |
| 297 | |
| 298 | func (o *Operator) reListCmp(v interface{}) bool { |
| 299 | dstHost := v.(string) |