diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 517e81933..753c385d8 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -768,7 +768,9 @@ sub use_input_chain($) { my $interfaceref = find_interface($interface); my $nets = $interfaceref->{nets}; # - # We must use the interfaces's chain if the interface is associated with multiple zone nets + # We must use the interfaces's chain if the interface is associated with multiple zone nets or + # if the interface has the 'upnpclient' option. In the latter case, the chain's rules will contain + # run-time code which currently cannot be transferred to a zone-oriented chain by move_rules(). # return 1 if $nets > 1 || $interfaceref->{options}{upnpclient}; # diff --git a/Shorewall/Perl/Shorewall/Compiler.pm b/Shorewall/Perl/Shorewall/Compiler.pm index dc326533c..fc0b67c5c 100644 --- a/Shorewall/Perl/Shorewall/Compiler.pm +++ b/Shorewall/Perl/Shorewall/Compiler.pm @@ -262,22 +262,18 @@ sub generate_script_2() { emit ( 'esac' ) , } - unless ( $providers ) { - my $interfaces = find_interfaces_by_option 'optional'; + my $interfaces = find_interfaces_by_option 'optional'; - if ( $interfaces ) { - emit ''; + if ( $interfaces ) { + emit ''; - my $first = 1; - - for my $interface ( @$interfaces ) { + my $first = 1; + + for my $interface ( @$interfaces ) { + unless ( is_provider_interface $interface ) { my $base = uc chain_base( $interface ); - if ( $first ) { - $first = 0; - } else { - emit ''; - } + $first and $first = 0 or emit ''; emit ( "if interface_is_usable $interface; then" , " ${base}_IS_UP=Yes" , diff --git a/Shorewall/Perl/Shorewall/Providers.pm b/Shorewall/Perl/Shorewall/Providers.pm index 11eb02c15..c86d4b1ca 100644 --- a/Shorewall/Perl/Shorewall/Providers.pm +++ b/Shorewall/Perl/Shorewall/Providers.pm @@ -33,7 +33,7 @@ use Shorewall::Chains qw(:DEFAULT :internal); use strict; our @ISA = qw(Exporter); -our @EXPORT = qw( setup_providers @routemarked_interfaces handle_stickiness $providers ); +our @EXPORT = qw( setup_providers @routemarked_interfaces handle_stickiness is_provider_interface ); our @EXPORT_OK = qw( initialize lookup_provider ); our $VERSION = '4.3_7'; @@ -56,7 +56,7 @@ our %providers; our @providers; -our $providers; +our %provider_interfaces; our $family; @@ -75,6 +75,7 @@ sub initialize( $ ) { @routemarked_providers = (); %routemarked_interfaces = (); @routemarked_interfaces = (); + %provider_interfaces = (); $balancing = 0; $fallback = 0; $first_default_route = 1; @@ -265,6 +266,9 @@ sub add_a_provider( ) { } fatal_error "Unknown Interface ($interface)" unless known_interface $interface; + fatal_error "Duplicate Provider Interface ($interface)" if $provider_interfaces{$interface}; + + $provider_interfaces{$interface} = 1; my $provider = chain_base $table; my $base = uc chain_base $interface; @@ -748,7 +752,7 @@ sub test_optional_providers() { } sub setup_providers() { - $providers = 0; + my $providers = 0; my $fn = open_file 'providers'; @@ -823,6 +827,10 @@ sub lookup_provider( $ ) { $providerref->{shared} ? $providerref->{number} : 0; } +sub is_provider_interface( $ ) { + return $provider_interfaces{$_[0]} || 0; +} + # # The Tc module has collected the 'sticky' rules in the 'tcpre' and 'tcout' chains. In this function, we apply them # to the 'tracked' providers diff --git a/Shorewall/releasenotes.txt b/Shorewall/releasenotes.txt index a841e66b2..1c608f24c 100644 --- a/Shorewall/releasenotes.txt +++ b/Shorewall/releasenotes.txt @@ -106,6 +106,9 @@ Shorewall 4.4.0 Beta 2 want your configuration backed up prior to upgradeing, you will need to do that yourself. + As part of this change, the fallback.sh scripts are no longer + released. + ---------------------------------------------------------------------------- P R O B L E M S C O R R E C T E D I N 4 . 4 . 0 Beta 2 ---------------------------------------------------------------------------- @@ -120,6 +123,9 @@ Shorewall 4.4.0 Beta 2 ERROR: Command "tc qdisc add dev dsl0 root handle 1: htb default 0 r2q 5.5" Failed +3) The help output from the install.sh scripts mentioned the '-n' + option but support for that option has been removed. + ---------------------------------------------------------------------------- K N O W N P R O B L E M S R E M A I N I N G ----------------------------------------------------------------------------