Tweak loopback change

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2015-01-04 11:00:02 -08:00
parent 60d5a177a3
commit 0f1f54b57b
3 changed files with 5 additions and 3 deletions

View File

@ -1986,6 +1986,10 @@ sub zone_forward_chain($) {
# #
sub use_forward_chain($$) { sub use_forward_chain($$) {
my ( $interface, $chainref ) = @_; my ( $interface, $chainref ) = @_;
my @loopback_zones = loopback_zones;
return 0 if $interface eq loopback_interface && ! @loopback_zones;
my $interfaceref = find_interface($interface); my $interfaceref = find_interface($interface);
my $nets = $interfaceref->{nets}; my $nets = $interfaceref->{nets};

View File

@ -1475,10 +1475,8 @@ sub handle_loopback_traffic() {
# #
if ( $unmanaged = $loref && $loref->{options}{unmanaged} ) { if ( $unmanaged = $loref && $loref->{options}{unmanaged} ) {
if ( have_capability 'IFACE_MATCH' ) { if ( have_capability 'IFACE_MATCH' ) {
add_ijump( $filter_table->{INPUT}, j => 'ACCEPT', iface => '--dev-in --loopback' );
add_ijump( $filter_table->{OUTPUT}, j => 'ACCEPT', iface => '--dev-out --loopback' ); add_ijump( $filter_table->{OUTPUT}, j => 'ACCEPT', iface => '--dev-out --loopback' );
} else { } else {
add_ijump( $filter_table->{INPUT}, j => 'ACCEPT', i => loopback_interface );
add_ijump( $filter_table->{OUTPUT}, j => 'ACCEPT', o => loopback_interface ); add_ijump( $filter_table->{OUTPUT}, j => 'ACCEPT', o => loopback_interface );
} }
} else { } else {

View File

@ -1488,7 +1488,7 @@ sub validate_interfaces_file( $ ) {
number => $nextinum++, number => $nextinum++,
root => 'lo', root => 'lo',
broadcasts => undef, broadcasts => undef,
options => { unmanaged => 1, loopback => 1 , ignore => 1 }, options => { loopback => 1 , ignore => 1 },
zone => '', zone => '',
physical => 'lo' }; physical => 'lo' };
push @interfaces, $loopback_interface = 'lo'; push @interfaces, $loopback_interface = 'lo';