Commit 09b63df9 authored by Chris O'Haver's avatar Chris O'Haver Committed by GitHub

fix cidr multi-zone check (#4682)

Signed-off-by: default avatarChris O'Haver <cohaver@infoblox.com>
parent 79d67953
...@@ -93,9 +93,10 @@ func parseStanza(c *caddy.Controller) (*Forward, error) { ...@@ -93,9 +93,10 @@ func parseStanza(c *caddy.Controller) (*Forward, error) {
return f, c.ArgErr() return f, c.ArgErr()
} }
origFrom := f.from origFrom := f.from
f.from = plugin.Host(f.from).NormalizeExact()[0] // there can only be one here, won't work with non-octet reverse zones := plugin.Host(f.from).NormalizeExact()
f.from = zones[0] // there can only be one here, won't work with non-octet reverse
if len(f.from) > 1 { if len(zones) > 1 {
log.Warningf("Unsupported CIDR notation: '%s' expands to multiple zones. Using only '%s'.", origFrom, f.from) log.Warningf("Unsupported CIDR notation: '%s' expands to multiple zones. Using only '%s'.", origFrom, f.from)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment