[pve-devel] [PATCH firewall 1/2] fix some regular expressions mixups

Wolfgang Bumiller w.bumiller at proxmox.com
Thu Jan 7 14:11:34 CET 2016


Replacing some (:?...) with (?:...) which makes more sense
here.
---
 src/PVE/Firewall.pm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm
index 08ca3c1..3bb4d68 100644
--- a/src/PVE/Firewall.pm
+++ b/src/PVE/Firewall.pm
@@ -1513,12 +1513,12 @@ sub iptables_get_chains {
 
 	return 1 if $name =~ m/^PVEFW-\S+$/;
 
-	return 1 if $name =~ m/^tap\d+i\d+-(:?IN|OUT)$/;
+	return 1 if $name =~ m/^tap\d+i\d+-(?:IN|OUT)$/;
 
-	return 1 if $name =~ m/^veth\d+i\d+-(:?IN|OUT)$/;
+	return 1 if $name =~ m/^veth\d+i\d+-(?:IN|OUT)$/;
 
-	return 1 if $name =~ m/^fwbr\d+(v\d+)?-(:?FW|IN|OUT|IPS)$/;
-	return 1 if $name =~ m/^GROUP-(:?[^\s\-]+)-(:?IN|OUT)$/;
+	return 1 if $name =~ m/^fwbr\d+(v\d+)?-(?:FW|IN|OUT|IPS)$/;
+	return 1 if $name =~ m/^GROUP-(?:[^\s\-]+)-(?:IN|OUT)$/;
 
 	return undef;
     };
-- 
2.1.4





More information about the pve-devel mailing list