From c4768d4a4a2f795d0f98e44c21f8a0223d040d40 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 6 Jan 2012 11:59:22 -0800 Subject: [PATCH] Allow run-time address variable in the SOURCE column of route_rules Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Providers.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Shorewall/Perl/Shorewall/Providers.pm b/Shorewall/Perl/Shorewall/Providers.pm index 874965bb4..d68e55543 100644 --- a/Shorewall/Perl/Shorewall/Providers.pm +++ b/Shorewall/Perl/Shorewall/Providers.pm @@ -855,6 +855,8 @@ sub add_an_rtrule( ) { if ( $source eq '-' ) { $source = 'from ' . ALLIP; + } elsif ( $source =~ s/^&// ) { + $source = 'from ' . record_runtime_address $source; } elsif ( $family == F_IPV4 ) { if ( $source =~ /:/ ) { ( my $interface, $source , my $remainder ) = split( /:/, $source, 3 );