[Ferm] Variable interpolation
Kiss Gabor (Bitman)
kissg at ssg.ki.iif.hu
Thu Aug 24 11:21:25 CEST 2017
I suggest the following patch:
--------------------8<-----------------8<---------------
--- ferm.orig 2017-04-02 21:05:10.000000000 +0200
+++ ferm 2017-08-24 11:17:39.545273851 +0200
@@ -1863,7 +1863,7 @@
error('No protocol specified before TCPMSS')
unless defined $protos;
foreach my $proto (to_array $protos) {
- error('TCPMSS not available for protocol "$proto"')
+ error(qq{TCPMSS not available for protocol "$proto"})
unless $proto eq 'tcp';
}
}
@@ -2355,7 +2355,7 @@
my $jumpkey = $keyword;
$jumpkey =~ s/^sub/\@sub/;
- error('No rule specified before $jumpkey')
+ error(qq{No rule specified before '$jumpkey'})
unless $rule{has_rule};
my $subchain;
@@ -2380,7 +2380,7 @@
set_target(%rule, $jumptype, $subchain);
- error('"{" or chain name expected after $jumpkey')
+ error(qq{"{" or chain name expected after $jumpkey})
unless $keyword eq '{';
# create a deep copy of %rule, only containing values
--------------------8<-----------------8<---------------
Currently the user can not see _content_ of $proto and $jumpkey
variables because variable interpolation is disabled in
single quoted strings.
Gabor
More information about the Ferm
mailing list