summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaurav Sinha <gaurav.sinha@vyatta.com>2012-08-21 14:12:09 -0700
committerGaurav Sinha <gaurav.sinha@vyatta.com>2012-08-21 14:12:09 -0700
commit81681e20da270129b4f41e2f4ac8a822992b1f5a (patch)
tree4903a7acf20959d3ff8a48428dcda980d5dd94ab
parent055ec2701c5d516b1309abdc422605d52da470e7 (diff)
downloadvyatta-conntrack-81681e20da270129b4f41e2f4ac8a822992b1f5a.tar.gz
vyatta-conntrack-81681e20da270129b4f41e2f4ac8a822992b1f5a.zip
changed any to 0.0.0.0, all based on field, minor modifications in show script
-rw-r--r--scripts/vyatta-show-ignore.pl18
1 files changed, 7 insertions, 11 deletions
diff --git a/scripts/vyatta-show-ignore.pl b/scripts/vyatta-show-ignore.pl
index 6bcfd15..ec77cfb 100644
--- a/scripts/vyatta-show-ignore.pl
+++ b/scripts/vyatta-show-ignore.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
-# Module: vyatta-show-conntrack.pl
+# Module: vyatta-show-ignore.pl
#
# **** License ****
# This program is free software; you can redistribute it and/or modify
@@ -34,10 +34,6 @@ use Vyatta::Misc;
use warnings;
use strict;
-my $format = "%-10s %-22s %-22s %-16s %-20s\n";
-my $format_IPv6 = "%-10s %-40s %-40s %-16s %-20s\n";
-my $href; #reference to hash containing protocol-num to name key-value pairs
-
sub numerically { $a <=> $b; }
sub print_ignore_rules {
@@ -51,8 +47,8 @@ sub print_ignore_rules {
if (!(@rules_in_chain)){
die "Error: no ignore rules configured\n";
}
- printf($format_ignore_rules, 'rule', 'source', 'destination', 'protocol', 'Interface [IN]', 'packets', 'bytes');
- splice(@rules_in_chain, 0, 2);
+ printf($format_ignore_rules, 'rule', 'source', 'destination', 'protocol', 'int', 'pkts', 'bytes');
+ splice(@rules_in_chain, 0, 2); # dont need first two lines
my $rulecount = 0;
foreach (@rules) {
my $sourceAddress = "any";
@@ -72,11 +68,11 @@ sub print_ignore_rules {
$interface = $config->returnOrigValue("inbound-interface");
if (!defined ($sourcePort)) { $sourcePort = "any";}
- if (!defined ($sourceAddress)) { $sourceAddress = "any";}
+ if (!defined ($sourceAddress)) { $sourceAddress = "0.0.0.0";}
if (!defined ($destPort)) { $destPort = "any";}
- if (!defined ($destinationAddress)) { $destinationAddress = "any";}
- if (!defined ($protocol)) { $protocol = "any";}
- if (!defined ($interface)) { $interface = "any";}
+ if (!defined ($destinationAddress)) { $destinationAddress = "0.0.0.0";}
+ if (!defined ($protocol)) { $protocol = "all";}
+ if (!defined ($interface)) { $interface = "all";}
$sourceAddress .= ":$sourcePort";
$destinationAddress .= ":$destPort";