From f33f333937739d952dfc0805f480e84020b91b77 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Wed, 17 Feb 2016 15:25:46 -0800 Subject: [PATCH] Make 'default' and 'none' case insensitive in the GATEWAY column Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Providers.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Providers.pm b/Shorewall/Perl/Shorewall/Providers.pm index 1cf471903..967326c0d 100644 --- a/Shorewall/Perl/Shorewall/Providers.pm +++ b/Shorewall/Perl/Shorewall/Providers.pm @@ -481,18 +481,19 @@ sub process_a_provider( $ ) { $interface = $interfaceref->{name} unless $interfaceref->{wildcard}; } - my $gatewaycase = ''; - if ( $physical =~ /\+$/ ) { return 0 if $pseudo; fatal_error "Wildcard interfaces ($physical) may not be used as provider interfaces"; } - if ( $gateway eq 'detect' ) { + my $gatewaycase = ''; + my $gw; + + if ( ( $gw = lc $gateway ) eq 'detect' ) { fatal_error "Configuring multiple providers through one interface requires an explicit gateway" if $shared; $gateway = get_interface_gateway $interface; $gatewaycase = 'detect'; - } elsif ( $gateway eq 'none' ) { + } elsif ( $gw eq 'none' ) { fatal_error "Configuring multiple providers through one interface requires a gateway" if $shared; $gatewaycase = 'none'; $gateway = '';