summaryrefslogtreecommitdiff
path: root/scripts/vyatta-cthelper.pl
diff options
context:
space:
mode:
authorGaurav Sinha <gaurav.sinha@vyatta.com>2012-06-07 23:19:36 -0700
committerGaurav Sinha <gaurav.sinha@vyatta.com>2012-06-07 23:19:36 -0700
commit2d083c4aba26b08c68f812119d49e70328d9ef8b (patch)
treed79bd4962972bc1f41f85e294858e2e2ec434274 /scripts/vyatta-cthelper.pl
parentca94628e7c1f78486a8f3ea89cba3b2c2f1f1320 (diff)
downloadvyatta-conntrack-2d083c4aba26b08c68f812119d49e70328d9ef8b.tar.gz
vyatta-conntrack-2d083c4aba26b08c68f812119d49e70328d9ef8b.zip
re-factored deletion code, disabling module scripts fixed
Diffstat (limited to 'scripts/vyatta-cthelper.pl')
-rw-r--r--scripts/vyatta-cthelper.pl23
1 files changed, 8 insertions, 15 deletions
diff --git a/scripts/vyatta-cthelper.pl b/scripts/vyatta-cthelper.pl
index f038037..d19a1f4 100644
--- a/scripts/vyatta-cthelper.pl
+++ b/scripts/vyatta-cthelper.pl
@@ -31,13 +31,11 @@ add_helper_to_chain {
my ($module) = @_;
my $iptables_cmd = $cmd_hash {'ipv4'};
if ($module eq 'sqlnet') {
-# run_cmd (" $iptables_cmd -I VYATTA_CT_HELPER -t raw -p tcp --dport 1521 -j CT --helper oracletns ");
- print " $iptables_cmd -I VYATTA_CT_HELPER -t raw -p tcp --dport 1521 -j CT --helper oracletns \n";
-# run_cmd (" $iptables_cmd -I VYATTA_CT_HELPER -t raw -p tcp --dport 1525 -j CT --helper oracletns ");
- print " $iptables_cmd -I VYATTA_CT_HELPER -t raw -p tcp --dport 1525 -j CT --helper oracletns \n";
+ run_cmd("$iptables_cmd -I VYATTA_CT_HELPER -t raw -p tcp --dport 1521 -j CT --helper tns");
+ run_cmd("$iptables_cmd -I VYATTA_CT_HELPER -t raw -p tcp --dport 1525 -j CT --helper tns");
} elsif ($module eq 'nfs') {
- print " $iptables_cmd -I VYATTA_CT_HELPER -t raw -p tcp --dport 111 -j CT --helper nfs \n";
-# run_cmd (" $iptables_cmd -I VYATTA_CT_HELPER -t raw -p tcp --dport 111 -j CT --helper nfs ");
+ run_cmd(" $iptables_cmd -I VYATTA_CT_HELPER -t raw -p tcp --dport 111 -j CT --helper rpc");
+ run_cmd(" $iptables_cmd -I VYATTA_CT_HELPER -t raw -p udp --dport 111 -j CT --helper rpc");
}
}
@@ -47,13 +45,11 @@ delete_helper_from_chain {
my ($module) = @_;
my $iptables_cmd = $cmd_hash {'ipv4'};
if ($module eq 'sqlnet') {
-# run_cmd (" $iptables_cmd -D VYATTA_CT_HELPER -t raw -p tcp --dport 1521 -j CT --helper oracletns ");
- print " $iptables_cmd -D VYATTA_CT_HELPER -t raw -p tcp --dport 1521 -j CT --helper oracletns \n";
-# run_cmd (" $iptables_cmd -D VYATTA_CT_HELPER -t raw -p tcp --dport 1525 -j CT --helper oracletns ");
- print " $iptables_cmd -D VYATTA_CT_HELPER -t raw -p tcp --dport 1525 -j CT --helper oracletns \n";
+ run_cmd ("$iptables_cmd -D VYATTA_CT_HELPER -t raw -p tcp --dport 1521 -j CT --helper tns");
+ run_cmd ("$iptables_cmd -D VYATTA_CT_HELPER -t raw -p tcp --dport 1525 -j CT --helper tns");
} elsif ($module eq 'nfs') {
- print " $iptables_cmd -D VYATTA_CT_HELPER -t raw -p tcp --dport 111 -j CT --helper nfs \n";
-# run_cmd (" $iptables_cmd -D VYATTA_CT_HELPER -t raw -p tcp --dport 111 -j CT --helper nfs ");
+ run_cmd("$iptables_cmd -D VYATTA_CT_HELPER -t raw -p tcp --dport 111 -j CT --helper rpc");
+ run_cmd("$iptables_cmd -D VYATTA_CT_HELPER -t raw -p udp --dport 111 -j CT --helper rpc");
}
}
@@ -61,15 +57,12 @@ delete_helper_from_chain {
sub disable_helper_module {
my ($module) = @_;
- print "disable $module\n";
delete_helper_from_chain($module);
}
# should enable the required helper module
sub enable_helper_module {
my ($module) = @_;
-
- print "enable $module\n";
add_helper_to_chain($module);
}