forked from extern/shorewall_code
More bug fixes
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5649 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
19779c8e9f
commit
04943614e4
@ -355,7 +355,7 @@ sub get_configuration() {
|
|||||||
default_yes_no 'CLEAR_TC' , 'Yes';
|
default_yes_no 'CLEAR_TC' , 'Yes';
|
||||||
default_yes_no 'CLAMPMSS' , '' unless $config{CLAMPMSS} =~ /^\d+$/;
|
default_yes_no 'CLAMPMSS' , '' unless $config{CLAMPMSS} =~ /^\d+$/;
|
||||||
|
|
||||||
unless ( $config{IP_ADD_ALIASES} || $config{ADD_SNAT_ALIASES} ) {
|
unless ( $config{ADD_IP_ALIASES} || $config{ADD_SNAT_ALIASES} ) {
|
||||||
$config{RETAIN_ALIASES} = '';
|
$config{RETAIN_ALIASES} = '';
|
||||||
} else {
|
} else {
|
||||||
default_yes_no 'RETAIN_ALIASES' , '';
|
default_yes_no 'RETAIN_ALIASES' , '';
|
||||||
|
@ -29,6 +29,7 @@ use strict;
|
|||||||
|
|
||||||
our @ISA = qw(Exporter);
|
our @ISA = qw(Exporter);
|
||||||
our @EXPORT = qw(
|
our @EXPORT = qw(
|
||||||
|
ip_range_explicit
|
||||||
);
|
);
|
||||||
our @EXPORT_OK = qw( );
|
our @EXPORT_OK = qw( );
|
||||||
our @VERSION = 1.00;
|
our @VERSION = 1.00;
|
||||||
|
@ -219,7 +219,6 @@ sub setup_one_masq($$$$$$)
|
|||||||
|
|
||||||
if ( $add_snat_aliases ) {
|
if ( $add_snat_aliases ) {
|
||||||
my ( $interface, $alias ) = split /:/, $fullinterface;
|
my ( $interface, $alias ) = split /:/, $fullinterface;
|
||||||
$alias = 0 unless defined $alias;
|
|
||||||
for my $address ( split /,/, $addresses ) {
|
for my $address ( split /,/, $addresses ) {
|
||||||
my ( $addrs, $port ) = split /:/, $address;
|
my ( $addrs, $port ) = split /:/, $address;
|
||||||
next unless $addrs;
|
next unless $addrs;
|
||||||
@ -227,8 +226,12 @@ sub setup_one_masq($$$$$$)
|
|||||||
unless ( $addresses_to_add{$addr} ) {
|
unless ( $addresses_to_add{$addr} ) {
|
||||||
emit "del_ip_addr $addr $interface" unless $config{RETAIN_ALIASES};
|
emit "del_ip_addr $addr $interface" unless $config{RETAIN_ALIASES};
|
||||||
$addresses_to_add{$addr} = 1;
|
$addresses_to_add{$addr} = 1;
|
||||||
|
if ( defined $alias ) {
|
||||||
push @addresses_to_add, $addr, "$interface:$alias";
|
push @addresses_to_add, $addr, "$interface:$alias";
|
||||||
$alias++;
|
$alias++;
|
||||||
|
} else {
|
||||||
|
push @addresses_to_add, $addr, $interface;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -312,8 +315,7 @@ sub do_one_nat( $$$$$ )
|
|||||||
$policyout = '-m policy --pol none --dir out';
|
$policyout = '-m policy --pol none --dir out';
|
||||||
}
|
}
|
||||||
|
|
||||||
fatal_error "Invalid nat file entry \"$line\""
|
fatal_error "Invalid nat file entry \"$line\"" unless defined $interface && defined $internal;
|
||||||
unless defined $interface and defined $internal;
|
|
||||||
|
|
||||||
if ( $add_ip_aliases ) {
|
if ( $add_ip_aliases ) {
|
||||||
if ( $interface =~ s/:$// ) {
|
if ( $interface =~ s/:$// ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user