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($$) {
my ( $interface, $chainref ) = @_;
my @loopback_zones = loopback_zones;
return 0 if $interface eq loopback_interface && ! @loopback_zones;
my $interfaceref = find_interface($interface);
my $nets = $interfaceref->{nets};

View File

@ -1475,10 +1475,8 @@ sub handle_loopback_traffic() {
#
if ( $unmanaged = $loref && $loref->{options}{unmanaged} ) {
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' );
} else {
add_ijump( $filter_table->{INPUT}, j => 'ACCEPT', i => loopback_interface );
add_ijump( $filter_table->{OUTPUT}, j => 'ACCEPT', o => loopback_interface );
}
} else {

View File

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