summaryrefslogtreecommitdiff
path: root/lib/Vyatta
diff options
context:
space:
mode:
authorGaurav Sinha <gaurav.sinha@vyatta.com>2012-08-29 16:30:02 -0700
committerGaurav Sinha <gaurav.sinha@vyatta.com>2012-08-29 16:30:02 -0700
commit7d93877527420cb0f878fa32b39273748fae7498 (patch)
treee45e15e798380f553faeaeda7bcd97a534072fe2 /lib/Vyatta
parent46c2a30d36dd0f6157bd60e506024b24c87f6669 (diff)
downloadvyatta-conntrack-7d93877527420cb0f878fa32b39273748fae7498.tar.gz
vyatta-conntrack-7d93877527420cb0f878fa32b39273748fae7498.zip
Fix 8308, use C version of vyatta-validate-type, also fixing handling negation as per iptables in script
Diffstat (limited to 'lib/Vyatta')
-rw-r--r--lib/Vyatta/Conntrack/RuleIgnore.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Vyatta/Conntrack/RuleIgnore.pm b/lib/Vyatta/Conntrack/RuleIgnore.pm
index 9b9abe1..9127fa2 100644
--- a/lib/Vyatta/Conntrack/RuleIgnore.pm
+++ b/lib/Vyatta/Conntrack/RuleIgnore.pm
@@ -42,7 +42,12 @@ sub rule {
exit 1;
}
if (defined($self->{_protocol})) {
- $rule .= " -p $self->{_protocol}";
+ if ($self->{_protocol} =~ m/^!/) {
+ my $protocol = substr($self->{_protocol}, 1);
+ $rule .= " ! -p $protocol";
+ } else {
+ $rule .= " -p $self->{_protocol}";
+ }
}
$rule .= " $srcrule $dstrule ";
return $rule;