summaryrefslogtreecommitdiffstats
path: root/lib/network/shorewall.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-26 14:44:28 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-26 14:44:28 +0000
commit4bae011ce5b573acf0c86e59557b60fbb35b49e4 (patch)
treefff1b29e3b08b5fa5c5f0c46b7b222ee66b58a9a /lib/network/shorewall.pm
parent9d123c26749cbcf7498b0051abf5777a9031ecde (diff)
downloaddrakx-net-4bae011ce5b573acf0c86e59557b60fbb35b49e4.tar
drakx-net-4bae011ce5b573acf0c86e59557b60fbb35b49e4.tar.gz
drakx-net-4bae011ce5b573acf0c86e59557b60fbb35b49e4.tar.bz2
drakx-net-4bae011ce5b573acf0c86e59557b60fbb35b49e4.tar.xz
drakx-net-4bae011ce5b573acf0c86e59557b60fbb35b49e4.zip
use a more logical key/value order in shorewall redirects hash
Diffstat (limited to 'lib/network/shorewall.pm')
-rw-r--r--lib/network/shorewall.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/network/shorewall.pm b/lib/network/shorewall.pm
index 5588792..3d0caeb 100644
--- a/lib/network/shorewall.pm
+++ b/lib/network/shorewall.pm
@@ -94,7 +94,7 @@ sub read {
map { "$_/$e->[3]" } split(',', $e->[4]);
} grep { $_->[0] eq 'ACCEPT' && $_->[1] eq 'net' } @rules),
);
- $conf{redirects}{$_->[3]}{$_->[2]} = $_->[4] foreach grep { $_->[0] eq 'REDIRECT' } @rules;
+ $conf{redirects}{$_->[3]}{$_->[4]} = $_->[2] foreach grep { $_->[0] eq 'REDIRECT' } @rules;
if (my ($e) = get_config_file('masq')) {
($conf{masq}{net_interface}, $conf{masq}{subnet}) = @$e;
@@ -185,7 +185,7 @@ What do you want to do?"),
if_($use_pptp, [ 'ACCEPT', 'fw', 'loc:10.0.0.138', 'gre' ]),
(map_each { [ 'ACCEPT', 'net', 'fw', $::a, join(',', @$::b), '-' ] } %$ports_by_proto),
(map {
- map_each { [ 'REDIRECT', 'loc', $::a, $_, $::b, '-' ] } %{$conf->{redirects}{$_}};
+ map_each { [ 'REDIRECT', 'loc', $::b, $_, $::a, '-' ] } %{$conf->{redirects}{$_}};
} keys %{$conf->{redirects}}),
));
set_config_file('masq', if_(exists $conf->{masq}, [ $conf->{masq}{net_interface}, $conf->{masq}{subnet} ]));