mirror of
https://github.com/coredns/coredns.git
synced 2026-10-10 12:35:21 -04:00
plugin/dns64: reject unsupported prefix lengths (#8611)
This commit is contained in:
@@ -84,7 +84,9 @@ func parsePrefix(c *caddy.Controller, addr string) (*net.IPNet, error) {
|
||||
if total != 128 {
|
||||
return nil, c.Errf("invalid netmask %d IPv6 address: %q", total, pref)
|
||||
}
|
||||
if n%8 != 0 || n < 32 || n > 96 {
|
||||
switch n {
|
||||
case 32, 40, 48, 56, 64, 96:
|
||||
default:
|
||||
return nil, c.Errf("invalid prefix length %q", pref)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user