summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Conntrack
diff options
context:
space:
mode:
authorGaurav Sinha <gaurav.sinha@vyatta.com>2012-03-17 12:42:05 -0700
committerGaurav Sinha <gaurav.sinha@vyatta.com>2012-03-17 12:42:05 -0700
commit0f71f18eaec8643d8f78b95bb1657734b3f5b368 (patch)
treec24a4340feefbba8b99a9f0e269f4cd75f324a64 /lib/Vyatta/Conntrack
parentec409015bfa33a4e33b7437f3ce7093c2b58d21a (diff)
downloadvyatta-conntrack-0f71f18eaec8643d8f78b95bb1657734b3f5b368.tar.gz
vyatta-conntrack-0f71f18eaec8643d8f78b95bb1657734b3f5b368.zip
delete nfct fixed, use only policy name, modified deletion function
Diffstat (limited to 'lib/Vyatta/Conntrack')
-rw-r--r--lib/Vyatta/Conntrack/RuleCT.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Vyatta/Conntrack/RuleCT.pm b/lib/Vyatta/Conntrack/RuleCT.pm
index ee52ce3..bab941e 100644
--- a/lib/Vyatta/Conntrack/RuleCT.pm
+++ b/lib/Vyatta/Conntrack/RuleCT.pm
@@ -185,10 +185,14 @@ sub print {
# return a string that has the nfct-timeout command to create
# a timeout policy.
sub get_policy_command {
- my ($self ) = @_;
+ my ($self, $is_delete) = @_;
my $command;
my @level_nodes = split (' ', $self->{_comment});
- $command .= "policy_$level_nodes[2]_$level_nodes[5] inet";
+ $command .= "policy_$level_nodes[2]_$level_nodes[5] ";
+ if ($is_delete eq "delete") {
+ return $command;
+ }
+ $command .= " inet";
if ($self->{_protocol} eq 'tcp') {
$command .= " tcp";
if ($self->{_tcp}->{_close}) {