diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 8a15c4138..6cf5eeaa6 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -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 ) { diff --git a/Shorewall/Samples/Universal/shorewall.conf b/Shorewall/Samples/Universal/shorewall.conf index c446b86cb..aa33bf1ec 100644 --- a/Shorewall/Samples/Universal/shorewall.conf +++ b/Shorewall/Samples/Universal/shorewall.conf @@ -114,6 +114,8 @@ ADD_SNAT_ALIASES=No ADMINISABSENTMINDED=Yes +IGNOREOLDCAPS=No + IGNOREUNKNOWNVARIABLES=No AUTOCOMMENT=Yes diff --git a/Shorewall/Samples/one-interface/shorewall.conf b/Shorewall/Samples/one-interface/shorewall.conf index 3e8cf69dc..6e42bc35e 100644 --- a/Shorewall/Samples/one-interface/shorewall.conf +++ b/Shorewall/Samples/one-interface/shorewall.conf @@ -125,6 +125,8 @@ ADD_SNAT_ALIASES=No ADMINISABSENTMINDED=Yes +IGNOREOLDCAPS=No + IGNOREUNKNOWNVARIABLES=No AUTOCOMMENT=Yes diff --git a/Shorewall/Samples/three-interfaces/shorewall.conf b/Shorewall/Samples/three-interfaces/shorewall.conf index ff7677731..a6f0658f6 100644 --- a/Shorewall/Samples/three-interfaces/shorewall.conf +++ b/Shorewall/Samples/three-interfaces/shorewall.conf @@ -123,6 +123,8 @@ ADD_SNAT_ALIASES=No ADMINISABSENTMINDED=Yes +IGNOREOLDCAPS=No + IGNOREUNKNOWNVARIABLES=No AUTOCOMMENT=Yes diff --git a/Shorewall/Samples/two-interfaces/shorewall.conf b/Shorewall/Samples/two-interfaces/shorewall.conf index 7e6f394f7..6ec111b7c 100644 --- a/Shorewall/Samples/two-interfaces/shorewall.conf +++ b/Shorewall/Samples/two-interfaces/shorewall.conf @@ -126,6 +126,8 @@ ADD_SNAT_ALIASES=No ADMINISABSENTMINDED=Yes +IGNOREOLDCAPS=No + IGNOREUNKNOWNVARIABLES=No AUTOCOMMENT=Yes diff --git a/Shorewall/configfiles/shorewall.conf b/Shorewall/configfiles/shorewall.conf index aa18f44f2..ab0618edc 100644 --- a/Shorewall/configfiles/shorewall.conf +++ b/Shorewall/configfiles/shorewall.conf @@ -114,6 +114,8 @@ ADD_SNAT_ALIASES=No ADMINISABSENTMINDED=Yes +IGNOREOLDCAPS=No + IGNOREUNKNOWNVARIABLES=No AUTOCOMMENT=Yes diff --git a/Shorewall/manpages/shorewall.conf.xml b/Shorewall/manpages/shorewall.conf.xml index 1ec731b2f..3d6b8f3a0 100644 --- a/Shorewall/manpages/shorewall.conf.xml +++ b/Shorewall/manpages/shorewall.conf.xml @@ -280,6 +280,18 @@ + + IGNOREOLDCAPS=[Yes|No] + + + 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. + + + IGNOREUNKNOWNVARIABLES=[ + + IGNOREOLDCAPS=[Yes|No] + + + 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. + + + IGNOREUNKNOWNVARIABLES=[