From: Wolfgang Bumiller Date: Wed, 28 Mar 2018 08:53:25 +0000 (+0200) Subject: parse_protocol_file: support lines without end comments X-Git-Url: https://git.proxmox.com/?p=pve-firewall.git;a=commitdiff_plain;h=d6dd6e96e4410109ffe944d2d4f990aa6d881b91;ds=sidebyside parse_protocol_file: support lines without end comments Signed-off-by: Wolfgang Bumiller Reviewed-by: Thomas Lamprecht Tested-by: Thomas Lamprecht --- 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}; }