Fix destination range handling

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5608 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-03-21 17:09:52 +00:00
parent 319bea7308
commit a6f3ed93be

View File

@ -808,12 +808,14 @@ sub do_user( $ ) {
}
#
# Create a "-m tos" match for the passed TOS[/MASK]
# Create a "-m tos" match for the passed TOS
#
sub do_tos( $ ) {
my $tos = $_[0];
$tos = '-' unless $tos;
$tos && $tos ne '-' ? "-m tos --tos $tos " : '';
$tos ne '-' ? "-m tos --tos $tos " : '';
}
#
@ -821,6 +823,7 @@ sub do_tos( $ ) {
#
sub iprange_match() {
my $match = '';
unless ( $iprangematch ) {
$match = '-m iprange ';
$iprangematch = 1;
@ -859,7 +862,7 @@ sub match_dest_net( $ ) {
if ( $net =~ /^(!?).*\..*\..*\..*-.*\..*\..*\..*/ ) {
$net =~ s/!// if my $invert = $1 ? '! ' : '';
iprange_match . "${invert}--src-range $net ";
iprange_match . "${invert}--dst-range $net ";
} elsif ( $net =~ /^!/ ) {
$net =~ s/!//;
"-d ! $net ";