mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-26 17:43:15 +01:00
Make ?...shell/perl directives case insensitive
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
4bd35a0b93
commit
71bcd11ab6
@ -2786,7 +2786,7 @@ sub embedded_shell( $ ) {
|
||||
my $last = 0;
|
||||
|
||||
while ( read_a_line( PLAIN_READ ) ) {
|
||||
last if $last = $currentline =~ s/^\s*\??END(\s+SHELL)?\s*(?:;\s*)?$//;
|
||||
last if $last = $currentline =~ s/^\s*\??END(\s+SHELL)?\s*(?:;\s*)?$//i;
|
||||
$command .= "$currentline\n";
|
||||
}
|
||||
|
||||
@ -2820,7 +2820,7 @@ sub embedded_perl( $ ) {
|
||||
my $last = 0;
|
||||
|
||||
while ( read_a_line( PLAIN_READ ) ) {
|
||||
last if $last = $currentline =~ s/^\s*\??END(\s+PERL)?\s*(?:;\s*)?//;
|
||||
last if $last = $currentline =~ s/^\s*\??END(\s+PERL)?\s*(?:;\s*)?//i;
|
||||
$command .= "$currentline\n";
|
||||
}
|
||||
|
||||
@ -3119,13 +3119,13 @@ sub read_a_line($) {
|
||||
# Must check for shell/perl before doing variable expansion
|
||||
#
|
||||
if ( $options & EMBEDDED_ENABLED ) {
|
||||
if ( $currentline =~ s/^\s*\??(BEGIN\s+)SHELL\s*;?// || $currentline =~ s/^\s*\??SHELL\s*// ) {
|
||||
if ( $currentline =~ s/^\s*\??(BEGIN\s+)SHELL\s*;?//i || $currentline =~ s/^\s*\??SHELL\s*//i ) {
|
||||
handle_first_entry if $first_entry;
|
||||
embedded_shell( $1 );
|
||||
next;
|
||||
}
|
||||
|
||||
if ( $currentline =~ s/^\s*\??(BEGIN\s+)PERL\s*;?// || $currentline =~ s/^\s*\??PERL\s*// ) {
|
||||
if ( $currentline =~ s/^\s*\??(BEGIN\s+)PERL\s*;?//i || $currentline =~ s/^\s*\??PERL\s*//i ) {
|
||||
handle_first_entry if $first_entry;
|
||||
embedded_perl( $1 );
|
||||
next;
|
||||
|
@ -27,11 +27,11 @@
|
||||
# Default action is DROP
|
||||
#
|
||||
##########################################################################################
|
||||
?FORMAT 2
|
||||
?format 2
|
||||
|
||||
DEFAULTS DROP,-
|
||||
|
||||
?BEGIN PERL;
|
||||
?begin perl;
|
||||
|
||||
use Shorewall::IPAddrs;
|
||||
use Shorewall::Config;
|
||||
@ -71,4 +71,4 @@ add_jump $chainref, $target, 0, '-d 224.0.0.0/4 ';
|
||||
|
||||
1;
|
||||
|
||||
?END PERL;
|
||||
?end perl;
|
||||
|
@ -28,12 +28,12 @@
|
||||
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
|
||||
#
|
||||
###############################################################################
|
||||
?FORMAT 2
|
||||
?format 2
|
||||
#
|
||||
# The following magic provides different defaults for @2 thru @5, when @1 is
|
||||
# 'audit'.
|
||||
#
|
||||
?BEGIN PERL;
|
||||
?begin perl;
|
||||
use Shorewall::Config;
|
||||
|
||||
my ( $p1, $p2, $p3 , $p4, $p5 ) = get_action_params( 5 );
|
||||
@ -50,7 +50,7 @@ if ( defined $p1 ) {
|
||||
|
||||
1;
|
||||
|
||||
?END PERL;
|
||||
?end perl;
|
||||
|
||||
DEFAULTS -,-,DROP,ACCEPT,DROP
|
||||
|
||||
|
@ -9,11 +9,11 @@
|
||||
# audit = Audit dropped packets.
|
||||
#
|
||||
#################################################################################
|
||||
?FORMAT 2
|
||||
?format 2
|
||||
|
||||
DEFAULTS -
|
||||
|
||||
?BEGIN PERL;
|
||||
?begin perl;
|
||||
use strict;
|
||||
use Shorewall::Config qw(:DEFAULT F_IPV4 F_IPV6);
|
||||
use Shorewall::IPAddrs qw( IPv6_MULTICAST );
|
||||
@ -79,7 +79,7 @@ if ( $family == F_IPV4 ) {
|
||||
add_ijump( $chainref, g => $target, s => IPv6_MULTICAST );
|
||||
}
|
||||
|
||||
?END PERL;
|
||||
?end perl;
|
||||
|
||||
|
||||
|
||||
|
@ -27,11 +27,11 @@
|
||||
# Default action is ACCEPT
|
||||
#
|
||||
##########################################################################################
|
||||
?FORMAT 2
|
||||
?format 2
|
||||
|
||||
DEFAULTS ACCEPT
|
||||
|
||||
?BEGIN PERL;
|
||||
?begin perl;
|
||||
|
||||
use Shorewall::IPAddrs;
|
||||
use Shorewall::Config;
|
||||
@ -46,4 +46,4 @@ if ( my $check = check_state( 'ESTABLISHED' ) ) {
|
||||
|
||||
1;
|
||||
|
||||
?END PERL;
|
||||
?end perl;
|
||||
|
@ -27,11 +27,11 @@
|
||||
# Default action is DROP
|
||||
#
|
||||
##########################################################################################
|
||||
?FORMAT 2
|
||||
?format 2
|
||||
|
||||
DEFAULTS DROP,-
|
||||
|
||||
?BEGIN PERL;
|
||||
?begin perl;
|
||||
|
||||
use Shorewall::IPAddrs;
|
||||
use Shorewall::Config;
|
||||
@ -51,4 +51,4 @@ if ( my $check = check_state( 'INVALID' ) ) {
|
||||
|
||||
1;
|
||||
|
||||
?END PERL;
|
||||
?end perl;
|
||||
|
@ -27,11 +27,11 @@
|
||||
# Default action is ACCEPT
|
||||
#
|
||||
##########################################################################################
|
||||
?FORMAT 2
|
||||
?format 2
|
||||
|
||||
DEFAULTS ACCEPT
|
||||
|
||||
?BEGIN PERL;
|
||||
?begin perl;
|
||||
|
||||
use Shorewall::IPAddrs;
|
||||
use Shorewall::Config;
|
||||
@ -46,4 +46,4 @@ if ( my $check = check_state( 'NEW' ) ) {
|
||||
|
||||
1;
|
||||
|
||||
?END PERL;
|
||||
?end perl;
|
||||
|
@ -27,11 +27,11 @@
|
||||
# Default action is DROP
|
||||
#
|
||||
##########################################################################################
|
||||
?FORMAT 2
|
||||
?format 2
|
||||
|
||||
DEFAULTS DROP,-
|
||||
|
||||
?BEGIN PERL;
|
||||
?begin perl;
|
||||
|
||||
use strict;
|
||||
use Shorewall::IPAddrs;
|
||||
@ -50,4 +50,4 @@ perl_action_tcp_helper( $action, '-p 6 ! --syn' );
|
||||
|
||||
1;
|
||||
|
||||
?END PERL;
|
||||
?end perl;
|
||||
|
@ -27,11 +27,11 @@
|
||||
# Default action is DROP
|
||||
#
|
||||
##########################################################################################
|
||||
?FORMAT 2
|
||||
?format 2
|
||||
|
||||
DEFAULTS DROP,-
|
||||
|
||||
?BEGIN PERL;
|
||||
?begin perl;
|
||||
|
||||
use Shorewall::Config;
|
||||
use Shorewall::Chains;
|
||||
@ -48,4 +48,4 @@ perl_action_tcp_helper( $action, '-p 6 --tcp-flags RST RST' );
|
||||
|
||||
1;
|
||||
|
||||
?END PERL;
|
||||
?end perl;
|
||||
|
@ -27,12 +27,12 @@
|
||||
#
|
||||
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
|
||||
###############################################################################
|
||||
?FORMAT 2
|
||||
?format 2
|
||||
#
|
||||
# The following magic provides different defaults for @2 thru @5, when @1 is
|
||||
# 'audit'.
|
||||
#
|
||||
?BEGIN PERL;
|
||||
?begin perl;
|
||||
use Shorewall::Config;
|
||||
|
||||
my ( $p1, $p2, $p3 , $p4, $p5 ) = get_action_params( 5 );
|
||||
@ -49,7 +49,7 @@ if ( defined $p1 ) {
|
||||
|
||||
1;
|
||||
|
||||
?END PERL;
|
||||
?end perl;
|
||||
|
||||
DEFAULTS -,-,REJECT,ACCEPT,DROP
|
||||
|
||||
|
@ -27,11 +27,11 @@
|
||||
# Default action is DROP
|
||||
#
|
||||
##########################################################################################
|
||||
?FORMAT 2
|
||||
?format 2
|
||||
|
||||
DEFAULTS DROP
|
||||
|
||||
?BEGIN PERL;
|
||||
?begin perl;
|
||||
|
||||
use strict;
|
||||
use Shorewall::IPAddrs;
|
||||
@ -47,4 +47,4 @@ if ( my $check = check_state( 'RELATED' ) ) {
|
||||
|
||||
1;
|
||||
|
||||
?END PERL;
|
||||
?end perl;
|
||||
|
@ -9,11 +9,11 @@
|
||||
# audit = Audit dropped packets.
|
||||
#
|
||||
#################################################################################
|
||||
?FORMAT 2
|
||||
?format 2
|
||||
|
||||
DEFAULTS -
|
||||
|
||||
?BEGIN PERL;
|
||||
?begin perl;
|
||||
use strict;
|
||||
use Shorewall::Config qw(:DEFAULT F_IPV4 F_IPV6);
|
||||
use Shorewall::Chains;
|
||||
@ -34,7 +34,7 @@ perl_action_tcp_helper( $action, '-p tcp --tcp-flags SYN,RST SYN,RST' );
|
||||
perl_action_tcp_helper( $action, '-p tcp --tcp-flags SYN,FIN SYN,FIN' );
|
||||
perl_action_tcp_helper( $action, '-p tcp --syn --sport 0' );
|
||||
|
||||
?END PERL;
|
||||
?end perl;
|
||||
|
||||
|
||||
|
||||
|
@ -27,11 +27,11 @@
|
||||
# Default action is DROP
|
||||
#
|
||||
##########################################################################################
|
||||
?FORMAT 2
|
||||
?format 2
|
||||
|
||||
DEFAULTS DROP
|
||||
|
||||
?BEGIN PERL;
|
||||
?begin perl;
|
||||
|
||||
use Shorewall::IPAddrs;
|
||||
use Shorewall::Config;
|
||||
@ -46,4 +46,4 @@ if ( my $check = check_state( 'UNTRACKED' ) ) {
|
||||
|
||||
1;
|
||||
|
||||
?END PERL;
|
||||
?end perl;
|
||||
|
@ -25,11 +25,11 @@
|
||||
# allowInvalid[([audit])]
|
||||
#
|
||||
##########################################################################################
|
||||
?FORMAT 2
|
||||
?format 2
|
||||
|
||||
DEFAULTS -
|
||||
|
||||
?BEGIN PERL;
|
||||
?begin perl;
|
||||
|
||||
use strict;
|
||||
use Shorewall::IPAddrs;
|
||||
@ -50,4 +50,4 @@ perl_action_helper( "Invalid($action)", '' );
|
||||
|
||||
1;
|
||||
|
||||
?END PERL;
|
||||
?end perl;
|
||||
|
@ -25,11 +25,11 @@
|
||||
# dropInvalid[([audit])]
|
||||
#
|
||||
##########################################################################################
|
||||
?FORMAT 2
|
||||
?format 2
|
||||
|
||||
DEFAULTS -
|
||||
|
||||
?BEGIN PERL;
|
||||
?begin perl;
|
||||
|
||||
use strict;
|
||||
use Shorewall::IPAddrs;
|
||||
@ -50,4 +50,4 @@ perl_action_helper( "Invalid($action)", '' );
|
||||
|
||||
1;
|
||||
|
||||
?END PERL;
|
||||
?end perl;
|
||||
|
@ -20,7 +20,7 @@
|
||||
#
|
||||
#######################################################################################################
|
||||
# DO NOT REMOVE THE FOLLOWING LINE
|
||||
?FORMAT 2
|
||||
?format 2
|
||||
#################################################################################################################################################################################################
|
||||
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/ MARK CONNLIMIT TIME HEADERS SWITCH HELPER
|
||||
# PORT PORT(S) DEST LIMIT GROUP
|
||||
|
@ -8,7 +8,7 @@
|
||||
###############################################################################
|
||||
#TARGET SOURCE DEST PROTO DEST
|
||||
# PORT(S)
|
||||
?COMMENT Needed ICMP types (RFC4890)
|
||||
?comment Needed ICMP types (RFC4890)
|
||||
|
||||
A_ACCEPT - - ipv6-icmp destination-unreachable
|
||||
A_ACCEPT - - ipv6-icmp packet-too-big
|
||||
|
@ -9,7 +9,7 @@
|
||||
#TARGET SOURCE DEST PROTO DEST
|
||||
# PORT(S)
|
||||
|
||||
?FORMAT 2
|
||||
?format 2
|
||||
DEFAULTS ACCEPT
|
||||
|
||||
?COMMENT Needed ICMP types (RFC4890)
|
||||
|
@ -27,11 +27,11 @@
|
||||
# Default action is DROP
|
||||
#
|
||||
##########################################################################################
|
||||
?FORMAT 2
|
||||
?format 2
|
||||
|
||||
DEFAULTS DROP,-
|
||||
|
||||
?BEGIN PERL;
|
||||
?begin perl;
|
||||
|
||||
use Shorewall::IPAddrs;
|
||||
use Shorewall::Config;
|
||||
@ -68,4 +68,4 @@ add_jump $chainref, $target, 0, join( ' ', '-d', IPv6_MULTICAST . ' ' );
|
||||
|
||||
1;
|
||||
|
||||
?END PERL;
|
||||
?end perl;
|
||||
|
@ -31,12 +31,12 @@
|
||||
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
|
||||
#
|
||||
###############################################################################
|
||||
?FORMAT 2
|
||||
?format 2
|
||||
#
|
||||
# The following magic provides different defaults for $2 thru $5, when $1 is
|
||||
# 'audit'.
|
||||
#
|
||||
?BEGIN PERL;
|
||||
?begin perl;
|
||||
use Shorewall::Config;
|
||||
|
||||
my ( $p1, $p2, $p3 , $p4, $p5 ) = get_action_params( 5 );
|
||||
@ -54,7 +54,7 @@ if ( defined $p1 ) {
|
||||
|
||||
1;
|
||||
|
||||
?END PERL;
|
||||
?end perl;
|
||||
|
||||
DEFAULTS -,REJECT,DROP,ACCEPT,DROP
|
||||
|
||||
|
@ -27,12 +27,12 @@
|
||||
#
|
||||
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
|
||||
###############################################################################
|
||||
?FORMAT 2
|
||||
?format 2
|
||||
#
|
||||
# The following magic provides different defaults for $2 thru $5, when $1 is
|
||||
# 'audit'.
|
||||
#
|
||||
?BEGIN PERL;
|
||||
?begin perl;
|
||||
use Shorewall::Config;
|
||||
|
||||
my ( $p1, $p2, $p3 , $p4, $p5 ) = get_action_params( 5 );
|
||||
@ -50,7 +50,7 @@ if ( defined $p1 ) {
|
||||
|
||||
1;
|
||||
|
||||
?END PERL;
|
||||
?end perl;
|
||||
|
||||
DEFAULTS -,REJECT,REJECT,ACCEPT,DROP
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#
|
||||
#######################################################################################################
|
||||
# DO NOT REMOVE THE FOLLOWING LINE
|
||||
?FORMAT 2
|
||||
?format 2
|
||||
#####################################################################################################################################################################################
|
||||
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/ MARK CONNLIMIT TIME HEADERS SWITCH HELPER
|
||||
# PORT PORT(S) DEST LIMIT GROUP
|
||||
|
Loading…
Reference in New Issue
Block a user