summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Conntrack/RuleCT.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Vyatta/Conntrack/RuleCT.pm')
-rw-r--r--lib/Vyatta/Conntrack/RuleCT.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Vyatta/Conntrack/RuleCT.pm b/lib/Vyatta/Conntrack/RuleCT.pm
index 9953291..5c59b93 100644
--- a/lib/Vyatta/Conntrack/RuleCT.pm
+++ b/lib/Vyatta/Conntrack/RuleCT.pm
@@ -74,6 +74,11 @@ sub rule {
Vyatta::Config::outputError(["Conntrack"], "Conntrack config error: $err_str");
exit 1;
}
+ if ($self->{_protocol} = "tcp") {
+ $rule .= " -p tcp";
+ } elsif ($self->{_protocol} = "udp") {
+ $rule .= " -p udp";
+ }
$rule .= " $srcrule $dstrule ";
return $rule;
}
@@ -181,7 +186,7 @@ sub get_policy_command {
my ($self ) = @_;
my $command;
my @level_nodes = split (' ', $self->{_comment});
- $command .= "policy_$level_nodes[2]_$level_nodes[5]";
+ $command .= "policy_$level_nodes[2]_$level_nodes[5] inet";
if ($self->{_protocol} eq 'tcp') {
$command .= " tcp";
if ($self->{_tcp}->{_close}) {