From 949368901f24ae92b91053e6b64671eed264ee39 Mon Sep 17 00:00:00 2001 From: Ossi Herrala Date: Mon, 10 Dec 2012 09:11:20 +0000 Subject: [PATCH] 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. ;) --- dns/manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dns/manifests/init.pp b/dns/manifests/init.pp index 234dc53..ecc373d 100644 --- a/dns/manifests/init.pp +++ b/dns/manifests/init.pp @@ -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 = "" }