summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-05-18 21:11:53 +0200
committerGitHub <noreply@github.com>2022-05-18 21:11:53 +0200
commit14dfa3c2e004588d83c996e612e9aef073f63f87 (patch)
tree7787eb966dd0a5a0fd679b2564578c0847f43a7f
parente92646a0b3ed4d25c55c52bc1ac1081b4687563a (diff)
parentcd7190eda077060445f516f1b2fd83c4cb45b81d (diff)
downloadvyatta-op-firewall-14dfa3c2e004588d83c996e612e9aef073f63f87.tar.gz
vyatta-op-firewall-14dfa3c2e004588d83c996e612e9aef073f63f87.zip
Merge pull request #3 from sever-sever/T4430-T21941.3.81.3.71.3.61.3.51.3.41.3.3-epa11.3.31.3.2equuleus
firewall: T4430: T2194: Fix firewall output bugs
-rwxr-xr-xscripts/firewall/vyatta-show-firewall.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/firewall/vyatta-show-firewall.pl b/scripts/firewall/vyatta-show-firewall.pl
index 051a00c..a4b3ce7 100755
--- a/scripts/firewall/vyatta-show-firewall.pl
+++ b/scripts/firewall/vyatta-show-firewall.pl
@@ -46,7 +46,7 @@ sub convert_to_easyunits {
}
sub numerically { $a <=> $b; }
-my $format1 = "%-5s %-8s %-9s %-8s %-40s";
+my $format1 = "%-9s %-8s %-9s %-8s %-40s";
my $format2 = " %-78s";
# mapping from config node to root config node.
@@ -329,6 +329,8 @@ sub print_detail_rule {
# trim leading and trailing whitespaces
$string =~ s/^\s+|\s+$//g;
+ # Hide comments like /* foo-20 */ T2194
+ $string =~ s/\/\* $chain-$rule \*\///;
@string_words = split (/\s+/, $string, 13);
@string_words_part1=splice(@string_words, 0, 4); # packets, bytes, target, proto
@@ -359,7 +361,7 @@ sub print_detail_rule {
if ($iptables_cmd =~ /6/) {
@string_words_part3=splice(@string_words, 5);# all other matches after comment
} else {
- @string_words_part3=splice(@string_words, 6);# all other matches after comment
+ @string_words_part3=splice(@string_words, 3);# all other matches after comment
}
}
my $condition='condition - ';