From d6dd6e96e4410109ffe944d2d4f990aa6d881b91 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 28 Mar 2018 10:53:25 +0200 Subject: [PATCH] parse_protocol_file: support lines without end comments Signed-off-by: Wolfgang Bumiller Reviewed-by: Thomas Lamprecht Tested-by: Thomas Lamprecht --- 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.39.2