mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04:00
dont panic when from-zone cannot be normalized (#5170)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
@@ -94,6 +94,9 @@ func parseStanza(c *caddy.Controller) (*Forward, error) {
|
||||
}
|
||||
origFrom := f.from
|
||||
zones := plugin.Host(f.from).NormalizeExact()
|
||||
if len(zones) == 0 {
|
||||
return f, fmt.Errorf("unable to normalize '%s'", f.from)
|
||||
}
|
||||
f.from = zones[0] // there can only be one here, won't work with non-octet reverse
|
||||
|
||||
if len(zones) > 1 {
|
||||
|
||||
Reference in New Issue
Block a user