From 64fb662bb16ba9d6fb76fd45b5090fa7ae8a83c0 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 5 May 2016 15:22:47 -0700 Subject: [PATCH] Verify Shorewall6 version when compiling for IPv6 Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index a87b9b617..4932468f5 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -5745,6 +5745,16 @@ sub get_configuration( $$$$ ) { warning_message "Version Mismatch: Shorewall-core is version $currentline, while the Shorewall version is $globals{VERSION}" unless $currentline eq $globals{VERSION}; + if ( $family == F_IPV6 ) { + open_file( "$globals{SHAREDIR}/version" ) || fatal_error "Unable to open $globals{SHAREDIR}/version"; + + fatal_error "$globals{SHAREDIR}/version is empty" unless read_a_line( PLAIN_READ ); + + close_file; + + warning_message "Version Mismatch: Shorewall6 is version $currentline, while the Shorewal version is $globals{VERSION}" unless $currentline eq $globals{VERSION}; + } + my $have_capabilities; if ( $export || $> != 0 ) {