mirror of
				https://github.com/coredns/coredns.git
				synced 2025-11-04 02:01:07 +01:00 
			
		
		
		
	fix cidr multi-zone check (#4682)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
		
							parent
							
								
									79d6795333
								
							
						
					
					
						commit
						09b63df9c1
					
				@ -93,9 +93,10 @@ func parseStanza(c *caddy.Controller) (*Forward, error) {
 | 
			
		||||
		return f, c.ArgErr()
 | 
			
		||||
	}
 | 
			
		||||
	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)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user