Match beginning and end of line in regexp. Don't play around with foo.bar.in-addr.arpa.example.com kind of things and break everything. ;)

This commit is contained in:
Ossi Herrala 2012-12-10 09:11:20 +00:00
parent 464848816a
commit 949368901f

View file

@ -269,7 +269,7 @@ define dns::zone($role = "master", $master = "", $slaves = [], $forwarders = [],
$source = "AUTO", $key = "none", $keytype = "hmac-md5",
$contact = "NONE") {
if $name =~ /([^\/]+\/)?([0-9]+)\/([0-9\.]+\.in-addr\.arpa)/ {
if $name =~ /^([^\/]+\/)?([0-9]+)\/([0-9\.]+\.in-addr\.arpa)$/ {
# Special handling for RFC2317 style in-addr.arpa zones
case $1 {
".": { $view = "" }