[pve-devel] [RFC firewall 2/8] parse_protocol_file: support lines without end comments
Wolfgang Bumiller
w.bumiller at proxmox.com
Wed Mar 28 10:53:25 CEST 2018
Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
---
src/PVE/Firewall.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm
index d8f05d8..ac48507 100644
--- a/src/PVE/Firewall.pm
+++ b/src/PVE/Firewall.pm
@@ -892,7 +892,7 @@ sub parse_protocol_file {
next if $line =~m/^#/;
next if ($line =~m/^\s*$/);
- if ($line =~ m!^(\S+)\s+(\d+)\s+.*$!) {
+ if ($line =~ m!^(\S+)\s+(\d+)(?:\s+.*)?$!) {
$protocols->{byid}->{$2}->{name} = $1;
$protocols->{byname}->{$1} = $protocols->{byid}->{$2};
}
--
2.11.0
More information about the pve-devel
mailing list