summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaurav Sinha <gaurav.sinha@vyatta.com>2012-08-07 10:21:44 -0700
committerGaurav Sinha <gaurav.sinha@vyatta.com>2012-08-07 10:21:44 -0700
commitc5034d9090283e617193eb55c53427d4a773e4fa (patch)
tree341c1a21bef68714474bbb777873c10ff5d0c23d
parent66971a32b157e1dfe4491843ab28857aa5495a4f (diff)
downloadvyatta-conntrack-c5034d9090283e617193eb55c53427d4a773e4fa.tar.gz
vyatta-conntrack-c5034d9090283e617193eb55c53427d4a773e4fa.zip
fixing rule creation
-rw-r--r--lib/Vyatta/Conntrack/RuleIgnore.pm7
-rw-r--r--scripts/vyatta-conntrack-ignore.pl3
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/Vyatta/Conntrack/RuleIgnore.pm b/lib/Vyatta/Conntrack/RuleIgnore.pm
index fd10e09..3ff0211 100644
--- a/lib/Vyatta/Conntrack/RuleIgnore.pm
+++ b/lib/Vyatta/Conntrack/RuleIgnore.pm
@@ -31,8 +31,11 @@ sub rule {
my $tcp_and_udp = 0;
# set CLI rule num as comment
my @level_nodes = split (' ', $self->{_comment});
- print "level nodes is @level_nodes\n";
- $rule .= "-m comment --comment \"$level_nodes[2]-$level_nodes[5]\" ";
+ $rule .= " -m comment --comment \"$level_nodes[2]-$level_nodes[4]\" ";
+
+ if (defined($self->{_interface})) {
+ $rule .= " -i $self->{_interface} ";
+ }
($srcrule, $err_str) = $src->rule();
if (defined($err_str)) {
Vyatta::Config::outputError(["Conntrack"], "Conntrack config error: $err_str");
diff --git a/scripts/vyatta-conntrack-ignore.pl b/scripts/vyatta-conntrack-ignore.pl
index ed5b23a..a7bdd37 100644
--- a/scripts/vyatta-conntrack-ignore.pl
+++ b/scripts/vyatta-conntrack-ignore.pl
@@ -73,7 +73,6 @@ sub handle_rule_creation {
my $node = new Vyatta::Conntrack::RuleIgnore;
my ($rule_string, $timeout_policy);
- print "handle_rule_creation\n";
do_interface_check($rule);
$node->setup("system conntrack ignore rule $rule");
$rule_string = $node->rule();
@@ -93,7 +92,6 @@ sub do_interface_check {
sub handle_rule_modification {
my ($rule, $num_rules) = @_;
- print "handle_rule_modification\n";
do_interface_check($rule);
handle_rule_deletion($rule);
handle_rule_creation($rule, $num_rules);
@@ -103,7 +101,6 @@ sub handle_rule_deletion {
my ($rule) = @_;
my $node = new Vyatta::Conntrack::RuleIgnore;
my ($rule_string);
- print "handle_rule_deletion\n";
$node->setupOrig("system conntrack ignore rule $rule");
$rule_string = $node->rule();
remove_ignore_policy($rule_string);