Add the 'IGNOREOLDCAPS' option

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-12-26 15:48:08 -08:00
parent 14bbda14a2
commit ef0102e9f1
13 changed files with 55 additions and 7 deletions

View File

@ -762,6 +762,7 @@ sub initialize( $;$$) {
AUTOHELPERS => undef,
RESTORE_ROUTEMARKS => undef,
IGNOREUNKNOWNVARIABLES => undef,
IGNOREOLDCAPS => undef,
#
# Packet Disposition
#
@ -4451,13 +4452,6 @@ sub read_capabilities() {
}
}
if ( $capabilities{CAPVERSION} ) {
warning_message "Your capabilities file is out of date -- it does not contain all of the capabilities defined by $Product version $globals{VERSION}"
unless $capabilities{CAPVERSION} >= $globals{CAPVERSION};
} else {
warning_message "Your capabilities file may not contain all of the capabilities defined by $Product version $globals{VERSION}";
}
unless ( $capabilities{KERNELVERSION} ) {
warning_message "Your capabilities file does not contain a Kernel Version -- using 2.6.30";
$capabilities{KERNELVERSION} = 20630;
@ -5044,6 +5038,7 @@ sub get_configuration( $$$$ ) {
default_yes_no 'AUTOHELPERS' , 'Yes';
default_yes_no 'RESTORE_ROUTEMARKS' , 'Yes';
default_yes_no 'IGNOREUNKNOWNVARIABLES' , 'Yes';
default_yes_no 'IGNOREOLDCAPS' , '';
$config{IPSET} = '' if supplied $config{IPSET} && $config{IPSET} eq 'ipset';
@ -5319,6 +5314,15 @@ sub get_configuration( $$$$ ) {
require_capability( 'XCONNMARK' , 'HIGH_ROUTE_MARKS=Yes' , 's' ) if $config{PROVIDER_OFFSET} > 0;
require_capability( 'MANGLE_ENABLED' , 'Traffic Shaping' , 's' ) if $config{TC_ENABLED};
unless ( $config{IGNOREOLDCAPS} ) {
if ( $capabilities{CAPVERSION} ) {
warning_message "Your capabilities file is out of date -- it does not contain all of the capabilities defined by $Product version $globals{VERSION}"
unless $capabilities{CAPVERSION} >= $globals{CAPVERSION};
} else {
warning_message "Your capabilities file may not contain all of the capabilities defined by $Product version $globals{VERSION}";
}
}
add_variables %config;
while ( my ($var, $val ) = each %renamed ) {

View File

@ -114,6 +114,8 @@ ADD_SNAT_ALIASES=No
ADMINISABSENTMINDED=Yes
IGNOREOLDCAPS=No
IGNOREUNKNOWNVARIABLES=No
AUTOCOMMENT=Yes

View File

@ -125,6 +125,8 @@ ADD_SNAT_ALIASES=No
ADMINISABSENTMINDED=Yes
IGNOREOLDCAPS=No
IGNOREUNKNOWNVARIABLES=No
AUTOCOMMENT=Yes

View File

@ -123,6 +123,8 @@ ADD_SNAT_ALIASES=No
ADMINISABSENTMINDED=Yes
IGNOREOLDCAPS=No
IGNOREUNKNOWNVARIABLES=No
AUTOCOMMENT=Yes

View File

@ -126,6 +126,8 @@ ADD_SNAT_ALIASES=No
ADMINISABSENTMINDED=Yes
IGNOREOLDCAPS=No
IGNOREUNKNOWNVARIABLES=No
AUTOCOMMENT=Yes

View File

@ -114,6 +114,8 @@ ADD_SNAT_ALIASES=No
ADMINISABSENTMINDED=Yes
IGNOREOLDCAPS=No
IGNOREUNKNOWNVARIABLES=No
AUTOCOMMENT=Yes

View File

@ -280,6 +280,18 @@
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">IGNOREOLDCAPS=</emphasis>[<emphasis
role="bold">Yes</emphasis>|<emphasis role="bold">No</emphasis>]</term>
<listitem>
<para>Added in Shorewall 4.5.12. When set to 'Yes' (the default),
the compiler issues a warning when it finds a capabilities file that
doesn't specify all of the capabilities supported by the compiler.
When IGNOREOLDCAPS is set to 'No', no warning is issued.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis
role="bold">IGNOREUNKNOWNVARIABLES=</emphasis>[<emphasis

View File

@ -109,6 +109,8 @@ ACCOUNTING_TABLE=filter
ADMINISABSENTMINDED=Yes
IGNOREOLDCAPS=No
IGNOREUNKNOWNVARIABLES=No
AUTOCOMMENT=Yes

View File

@ -109,6 +109,8 @@ ACCOUNTING_TABLE=filter
ADMINISABSENTMINDED=Yes
IGNOREOLDCAPS=No
IGNOREUNKNOWNVARIABLES=No
AUTOCOMMENT=Yes

View File

@ -109,6 +109,8 @@ ACCOUNTING_TABLE=filter
ADMINISABSENTMINDED=Yes
IGNOREOLDCAPS=No
IGNOREUNKNOWNVARIABLES=No
AUTOCOMMENT=Yes

View File

@ -109,6 +109,8 @@ ACCOUNTING_TABLE=filter
ADMINISABSENTMINDED=Yes
IGNOREOLDCAPS=No
IGNOREUNKNOWNVARIABLES=No
AUTOCOMMENT=Yes

View File

@ -109,6 +109,8 @@ ACCOUNTING_TABLE=filter
ADMINISABSENTMINDED=Yes
IGNOREOLDCAPS=No
IGNOREUNKNOWNVARIABLES=No
AUTOCOMMENT=Yes

View File

@ -217,6 +217,18 @@
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">IGNOREOLDCAPS=</emphasis>[<emphasis
role="bold">Yes</emphasis>|<emphasis role="bold">No</emphasis>]</term>
<listitem>
<para>Added in Shorewall 4.5.12. When set to 'Yes' (the default),
the compiler issues a warning when it finds a capabilities file that
doesn't specify all of the capabilities supported by the compiler.
When IGNOREOLDCAPS is set to 'No', no warning is issued.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis
role="bold">IGNOREUNKNOWNVARIABLES=</emphasis>[<emphasis