forked from extern/shorewall_code
Restrict hypen as range separator to use with integers
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
04051454bf
commit
4bb942f1f9
@ -436,7 +436,7 @@ sub validate_portpair( $$ ) {
|
||||
#
|
||||
# Accept '-' as a port-range separator
|
||||
#
|
||||
$pair =~ tr/-/:/;
|
||||
$pair =~ tr/-/:/ if $pair =~ /^[-0-9]+$/;
|
||||
|
||||
fatal_error "Invalid port range ($portpair)" if $pair =~ tr/:/:/ > 1;
|
||||
|
||||
|
@ -2621,7 +2621,8 @@ DNAT net loc:192.168.1.3 tcp <emphasis role="bold">4000:4100<
|
||||
"!4000:4100").</para>
|
||||
|
||||
<para>Beginning with Shorewall 5.0.14, a hyphen ("-") may also be used to
|
||||
separate the two port numbers.</para>
|
||||
separate the two port numbers; when using service names, the colon must
|
||||
still be used.</para>
|
||||
|
||||
<programlisting>#ACTION SOURCE DESTINATION PROTO DPORT
|
||||
DNAT net loc:192.168.1.3 tcp <emphasis role="bold">4000-4100</emphasis></programlisting>
|
||||
|
Loading…
Reference in New Issue
Block a user