diff options
author | Gaurav Sinha <gaurav.sinha@vyatta.com> | 2012-08-29 16:30:02 -0700 |
---|---|---|
committer | Gaurav Sinha <gaurav.sinha@vyatta.com> | 2012-08-29 16:30:02 -0700 |
commit | 7d93877527420cb0f878fa32b39273748fae7498 (patch) | |
tree | e45e15e798380f553faeaeda7bcd97a534072fe2 /lib/Vyatta | |
parent | 46c2a30d36dd0f6157bd60e506024b24c87f6669 (diff) | |
download | vyatta-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.pm | 7 |
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; |