summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-01-16 12:52:16 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-01-16 12:52:16 +0000
commited34673d3b633aebed12f76a77a18927605ae4dc (patch)
tree33b3bb3aab1132e459a3844e64c9c1425ef7e735 /perl-install
parent3a0c20dcb15fd2ffb1364f762c650f71bd826ed0 (diff)
downloaddrakx-ed34673d3b633aebed12f76a77a18927605ae4dc.tar
drakx-ed34673d3b633aebed12f76a77a18927605ae4dc.tar.gz
drakx-ed34673d3b633aebed12f76a77a18927605ae4dc.tar.bz2
drakx-ed34673d3b633aebed12f76a77a18927605ae4dc.tar.xz
drakx-ed34673d3b633aebed12f76a77a18927605ae4dc.zip
- add icmp support
- add "Echo request (ping)" choice
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/network/drakfirewall.pm11
-rw-r--r--perl-install/network/shorewall.pm2
2 files changed, 10 insertions, 3 deletions
diff --git a/perl-install/network/drakfirewall.pm b/perl-install/network/drakfirewall.pm
index aa0db51d9..fb8647a44 100644
--- a/perl-install/network/drakfirewall.pm
+++ b/perl-install/network/drakfirewall.pm
@@ -56,6 +56,11 @@ my @all_servers =
ports => '631/tcp 631/udp',
hide => 1,
},
+ {
+ name => N_("Echo request (ping)"),
+ ports => '8/icmp',
+ force_default_selection => 0,
+ },
);
sub port2server {
@@ -68,7 +73,7 @@ sub port2server {
sub check_ports_syntax {
my ($ports) = @_;
foreach (split ' ', $ports) {
- my ($nb, $range, $nb2) = m!^(\d+)(:(\d+))?/(tcp|udp)$! or return $_;
+ my ($nb, $range, $nb2) = m!^(\d+)(:(\d+))?/(tcp|udp|icmp)$! or return $_;
foreach my $port ($nb, if_($range, $nb2)) {
1 <= $port && $port <= 65535 or return $_;
}
@@ -103,7 +108,9 @@ sub default_from_pkgs {
my @pkgs = $in->do_pkgs->are_installed(map { split ' ', $_->{pkg} } @all_servers);
[ grep {
my $s = $_;
- any { member($_, @pkgs) } (split ' ', $s->{pkg});
+ exists $s->{force_default_selection} ?
+ $s->{force_default_selection} :
+ any { member($_, @pkgs) } split(' ', $s->{pkg});
} @all_servers ];
}
diff --git a/perl-install/network/shorewall.pm b/perl-install/network/shorewall.pm
index bd069f063..5dcdb70d2 100644
--- a/perl-install/network/shorewall.pm
+++ b/perl-install/network/shorewall.pm
@@ -114,7 +114,7 @@ sub write {
my %ports_by_proto;
foreach (split ' ', $conf->{ports}) {
- m!^(\d+)/(udp|tcp)$! or die "bad port $_\n";
+ m!^(\d+)/(udp|tcp|icmp)$! or die "bad port $_\n";
push @{$ports_by_proto{$2}}, $1;
}