mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-15 18:18:36 +01:00
Fix IPP2P matching
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6168 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
3c15fdabdd
commit
f64e8128ed
@ -775,9 +775,9 @@ sub do_proto( $$$ )
|
|||||||
$sports = '' if $sports eq '-';
|
$sports = '' if $sports eq '-';
|
||||||
|
|
||||||
if ( $proto ) {
|
if ( $proto ) {
|
||||||
if ( $proto =~ /^((tcp|6)((:syn)?))|(udp|17)$/ ) {
|
if ( $proto =~ /^(((tcp|6)((:syn)?))|(udp|17))$/ ) {
|
||||||
|
|
||||||
if ( $3 ) {
|
if ( $4 ) {
|
||||||
$output = '-p 6 --syn ';
|
$output = '-p 6 --syn ';
|
||||||
} else {
|
} else {
|
||||||
$proto = $protocols{$proto} if defined $protocols{$proto};
|
$proto = $protocols{$proto} if defined $protocols{$proto};
|
||||||
@ -817,7 +817,7 @@ sub do_proto( $$$ )
|
|||||||
}
|
}
|
||||||
|
|
||||||
fatal_error 'SOURCE PORT(S) not permitted with ICMP' if $sports ne '';
|
fatal_error 'SOURCE PORT(S) not permitted with ICMP' if $sports ne '';
|
||||||
} elsif ( $proto =~ /^(ipp2p(:(tcp|udp|all)))?$/i ) {
|
} elsif ( $proto =~ /^(ipp2p(:(tcp|udp|all))?)$/i ) {
|
||||||
require_capability( 'IPP2P_MATCH' , 'PROTO = ipp2p' );
|
require_capability( 'IPP2P_MATCH' , 'PROTO = ipp2p' );
|
||||||
$proto = $2 ? $3 : 'tcp';
|
$proto = $2 ? $3 : 'tcp';
|
||||||
$ports = 'ipp2p' unless $ports;
|
$ports = 'ipp2p' unless $ports;
|
||||||
|
@ -499,7 +499,7 @@ my %validlevels = ( debug => 7,
|
|||||||
ULOG => 'ULOG' );
|
ULOG => 'ULOG' );
|
||||||
|
|
||||||
#
|
#
|
||||||
# Validate a log level
|
# Validate a log level -- Drop the trailing '!' that some fools think is important.
|
||||||
#
|
#
|
||||||
sub validate_level( $ ) {
|
sub validate_level( $ ) {
|
||||||
my $level = $_[0];
|
my $level = $_[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user