From e1afc645bab9ac4d47ce1c7e741600808fdc4d3d Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Wed, 14 Sep 2011 08:24:44 -0700 Subject: [PATCH] Allow IPv6 stateless NAT (undocumented) Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Nat.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Nat.pm b/Shorewall/Perl/Shorewall/Nat.pm index b93ba4e23..c37440ccd 100644 --- a/Shorewall/Perl/Shorewall/Nat.pm +++ b/Shorewall/Perl/Shorewall/Nat.pm @@ -403,7 +403,7 @@ sub setup_netmap() { if ( my $fn = open_file 'netmap' ) { - first_entry( sub { progress_message2 "$doing $fn..."; require_capability 'NAT_ENABLED' , 'a non-empty netmap file' , 's'; } ); + first_entry "$doing $fn..."; while ( read_a_line ) { @@ -432,6 +432,8 @@ sub setup_netmap() { $interface = $interfaceref->{name}; } + require_capability 'NAT_ENABLED', 'Stateful NAT Entries', ''; + if ( $type eq 'DNAT' ) { add_ijump ensure_chain( 'nat' , input_chain $interface ) , j => "NETMAP --to $net2", @rulein , imatch_source_net( $net3 ), d => $net1; } elsif ( $type eq 'SNAT' ) {