From 0f71f18eaec8643d8f78b95bb1657734b3f5b368 Mon Sep 17 00:00:00 2001 From: Gaurav Sinha Date: Sat, 17 Mar 2012 12:42:05 -0700 Subject: delete nfct fixed, use only policy name, modified deletion function --- lib/Vyatta/Conntrack/RuleCT.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib') 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}) { -- cgit v1.2.3