Eliminate the MAPOLDACTIONS option

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2018-01-24 12:59:26 -08:00
parent 070a67d665
commit cdf5ad45d5
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10
8 changed files with 1 additions and 57 deletions

View File

@ -730,6 +730,7 @@ our %eliminated = ( LOGRATE => 1,
BLACKLISTNEWONLY => 1,
CHAIN_SCRIPTS => 1,
MODULE_SUFFIX => 1,
MAPOLDACTIONS => 1,
);
#
# Variables involved in ?IF, ?ELSE ?ENDIF processing
@ -937,7 +938,6 @@ sub initialize( $;$$$) {
MACLIST_TTL => undef,
SAVE_IPSETS => undef,
SAVE_ARPTABLES => undef,
MAPOLDACTIONS => undef,
FASTACCEPT => undef,
IMPLICIT_CONTINUE => undef,
IPSET_WARNINGS => undef,
@ -6391,7 +6391,6 @@ sub get_configuration( $$$$ ) {
default_yes_no 'SAVE_ARPTABLES' , '';
default_yes_no 'STARTUP_ENABLED' , 'Yes';
default_yes_no 'DELAYBLACKLISTLOAD' , '';
default_yes_no 'MAPOLDACTIONS' , 'Yes';
warning_message 'DELAYBLACKLISTLOAD=Yes is not supported by Shorewall ' . $globals{VERSION} if $config{DELAYBLACKLISTLOAD};

View File

@ -1714,34 +1714,6 @@ sub isolate_basic_target( $ ) {
$target =~ /^(\w+)[(].*[)]$/ ? $1 : $target;
}
#
# Map pre-3.0 actions to the corresponding Macro invocation
#
sub find_old_action ( $$$ ) {
my ( $target, $macro, $param ) = @_;
if ( my $actiontype = find_macro( $macro ) ) {
( $macro, $actiontype , $param );
} else {
( $target, 0, '' );
}
}
sub map_old_actions( $ ) {
my $target = shift;
if ( $target =~ /^Allow(.*)$/ ) {
find_old_action( $target, $1, 'ACCEPT' );
} elsif ( $target =~ /^Drop(.*)$/ ) {
find_old_action( $target, $1, 'DROP' );
} elsif ( $target = /^Reject(.*)$/ ) {
find_old_action( $target, $1, 'REJECT' );
} else {
( $target, 0, '' );
}
}
sub process_rule ( $$$$$$$$$$$$$$$$$$$$ );
sub process_mangle_rule1( $$$$$$$$$$$$$$$$$$$ );
sub process_snat1( $$$$$$$$$$$$ );
@ -2630,10 +2602,6 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$$ ) {
#
$actiontype = $targets{$basictarget} || find_macro( $basictarget );
if ( $config{ MAPOLDACTIONS } ) {
( $basictarget, $actiontype , $param ) = map_old_actions( $basictarget ) unless $actiontype || supplied $param;
}
fatal_error "Unknown ACTION ($action)" unless $actiontype;
$usergenerated = $actiontype & IPTABLES;

View File

@ -199,8 +199,6 @@ MACLIST_TTL=
MANGLE_ENABLED=Yes
MAPOLDACTIONS=No
MINIUPNPD=No
MARK_IN_FORWARD_CHAIN=No

View File

@ -210,8 +210,6 @@ MACLIST_TTL=
MANGLE_ENABLED=Yes
MAPOLDACTIONS=No
MINIUPNPD=No
MARK_IN_FORWARD_CHAIN=No

View File

@ -207,8 +207,6 @@ MACLIST_TTL=
MANGLE_ENABLED=Yes
MAPOLDACTIONS=No
MINIUPNPD=No
MARK_IN_FORWARD_CHAIN=No

View File

@ -210,8 +210,6 @@ MACLIST_TTL=
MANGLE_ENABLED=Yes
MAPOLDACTIONS=No
MINIUPNPD=No
MARK_IN_FORWARD_CHAIN=No

View File

@ -199,8 +199,6 @@ MACLIST_TTL=
MANGLE_ENABLED=Yes
MAPOLDACTIONS=No
MARK_IN_FORWARD_CHAIN=No
MINIUPNPD=No

View File

@ -1810,19 +1810,6 @@ LOG:info:,bar net fw</programlisting>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">MAPOLDACTIONS=</emphasis>[<emphasis
role="bold">Yes</emphasis>|<emphasis role="bold">No</emphasis>]</term>
<listitem>
<para>IPv4 only.</para>
<para>This option is included for compatibility with old Shorewall
configuration. New installs should always have
MAPOLDACTIONS=No.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">MINIUPNPD=</emphasis>[<emphasis
role="bold">Yes</emphasis>|<emphasis role="bold">No</emphasis>]</term>