summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-07-01 06:21:59 +0000
committerOlivier Blin <oblin@mandriva.org>2005-07-01 06:21:59 +0000
commitc07b9537629ab23d80bc0e645127f57e0d0e197e (patch)
treee8d8c4206e29d1f5d27ba6d502a4fb643dc010e1 /perl-install
parentca03fd38c046b250374502d004393bc278806731 (diff)
downloaddrakx-backup-do-not-use-c07b9537629ab23d80bc0e645127f57e0d0e197e.tar
drakx-backup-do-not-use-c07b9537629ab23d80bc0e645127f57e0d0e197e.tar.gz
drakx-backup-do-not-use-c07b9537629ab23d80bc0e645127f57e0d0e197e.tar.bz2
drakx-backup-do-not-use-c07b9537629ab23d80bc0e645127f57e0d0e197e.tar.xz
drakx-backup-do-not-use-c07b9537629ab23d80bc0e645127f57e0d0e197e.zip
add 'routeback' option for bridge interfaces in shorewall interfaces file
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/network/shorewall.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/network/shorewall.pm b/perl-install/network/shorewall.pm
index 1771ea280..11ee3c70f 100644
--- a/perl-install/network/shorewall.pm
+++ b/perl-install/network/shorewall.pm
@@ -111,13 +111,18 @@ sub write {
push @{$ports_by_proto{$3}}, $1;
}
+ my $interface_settings = sub {
+ my ($zone, $interface) = @_;
+ [ $zone, $interface, 'detect', if_(detect_devices::is_bridge_interface($interface), 'routeback') ];
+ };
+
set_config_file("zones",
[ 'net', 'Net', 'Internet zone' ],
if_($conf->{loc_interface}[0], [ 'loc', 'Local', 'Local' ]),
);
set_config_file('interfaces',
- [ 'net', $conf->{net_interface}, 'detect' ],
- (map { [ 'loc', $_, 'detect' ] } @{$conf->{loc_interface} || []}),
+ $interface_settings->('net', $conf->{net_interface}),
+ (map { $interface_settings->('loc', $_) } @{$conf->{loc_interface} || []}),
);
set_config_file('policy',
if_($conf->{loc_interface}[0], [ 'loc', 'net', 'ACCEPT' ], [ 'loc', 'fw', 'ACCEPT' ], [ 'fw', 'loc', 'ACCEPT' ]),