From c5a586aa3771bd54c978ead4438e0bf3d94dc298 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 9 Nov 2017 12:20:01 -0800 Subject: [PATCH] Allow [...] around gateway address in the providers file Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Providers.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Shorewall/Perl/Shorewall/Providers.pm b/Shorewall/Perl/Shorewall/Providers.pm index 921d46942..89bf3c0a6 100644 --- a/Shorewall/Perl/Shorewall/Providers.pm +++ b/Shorewall/Perl/Shorewall/Providers.pm @@ -512,6 +512,9 @@ sub process_a_provider( $ ) { set_interface_option( $interface, 'gateway', 'none' ); } elsif ( $gateway && $gateway ne '-' ) { ( $gateway, $mac ) = split_host_list( $gateway, 0 ); + + $gateway = $1 if $family == F_IPV6 && $gateway =~ /^\[(.+)\]$/; + validate_address $gateway, 0; if ( defined $mac ) {