mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-22 22:30:58 +01:00
Allow '--' to specify '-' as an action parameter
This commit is contained in:
parent
4111432a52
commit
79cbfd0126
@ -1800,7 +1800,8 @@ sub push_params( $ ) {
|
||||
|
||||
for ( my $i = 1; $i <= @params; $i++ ) {
|
||||
my $val = $params[$i - 1];
|
||||
$actparms{$i} = $val eq '-' ? '' : $val;
|
||||
|
||||
$actparms{$i} = $val eq '-' ? '' : $val eq '--' ? '-' : $val;
|
||||
}
|
||||
|
||||
$oldparams;
|
||||
|
@ -131,7 +131,8 @@ Beta 1
|
||||
|
||||
You can 'omit' a parameter in the list by using '-' (e,g,
|
||||
REDIRECT,-.info) would omit the second parameter (within the action
|
||||
body, $2 would expand to nothing).
|
||||
body, $2 would expand to nothing). If you want to specify '-' as an
|
||||
parameter value, use '--'.
|
||||
|
||||
Parameter values are also available to extensions scripts. See
|
||||
http://www.shorewall.net/Actions.html#Extension for more
|
||||
|
@ -252,9 +252,12 @@ REDIRECT net - tcp 80 - 1.2.3.4</programlisting>
|
||||
|
||||
<para>You can 'omit' parameters by using '-'.</para>
|
||||
|
||||
<para>Example: ACTION(REDIRECT,-,info) </para>
|
||||
<para>Example: ACTION(REDIRECT,-,info)</para>
|
||||
|
||||
<para>In the above example, $2 would expand to nothing.</para>
|
||||
|
||||
<para>If you want to make '-' a parameter value, use '--' (e.g.,
|
||||
ACTION(REDIRECT,--.info)).</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
|
Loading…
Reference in New Issue
Block a user