forked from extern/shorewall_code
Correct a comment
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
bb7b3123df
commit
a50c52675b
@ -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;
|
||||
|
@ -2168,6 +2168,31 @@ SSH(ACCEPT) net:$MYIP $FW
|
||||
<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 > 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 <= 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">
|
||||
|
Loading…
Reference in New Issue
Block a user