Correct a comment

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2016-03-12 15:08:04 -08:00
parent bb7b3123df
commit a50c52675b
2 changed files with 26 additions and 1 deletions

View File

@ -936,7 +936,7 @@ sub set_rule_option( $$$ ) {
#
# Shorewall::Rules::perl_action_tcp_helper() can produce rules that have two -p specifications.
# The first will have a modifier like '! --syn' while the second will not. We want to retain
# the first while
# the first one.
if ( $option eq 'p' ) {
my ( $proto ) = split( ' ', $ruleref->{p} );
return if $proto eq $value;

View File

@ -2168,6 +2168,31 @@ SSH(ACCEPT) net:$MYIP $FW
&lt;lines to be included if all three expressions evaluate to false.
?ENDIF</programlisting>
<para>Beginning in Shorewall 5.0.7, an error can be raised using the
?ERROR directive:</para>
<programlisting>?ERROR <replaceable>message</replaceable></programlisting>
<para>Variables in the message are evaluated and the result appears in a
standard Shorewall ERROR: message. </para>
<para>Example from the 5.0.7 action.GlusterFS:</para>
<programlisting>?if @1 !~ /^\d+/ || ! @1 || @1 &gt; 1024
?error Invalid value for Bricks (@1)
?elsif @2 !~ /^[01]$/
?error Invalid value for IB (@2)
?endif
</programlisting>
<para>The above code insures that the first action paramater is a non-zero
number &lt;= 1024 and that the second parameter is either 0 or 1. If 2000
is passed for the first parameter, the following error message is
generated:</para>
<programlisting> ERROR: Invalid value for Bricks (2000) /usr/share/shorewall/action.GlusterFS (line 15)
from /etc/shorewall/rules (line 45)</programlisting>
</section>
<section id="Embedded">