summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil.baturin@vyatta.com>2011-12-13 04:30:07 +0700
committerDaniil Baturin <daniil.baturin@vyatta.com>2011-12-13 04:30:07 +0700
commitc885af49e84e3714513ab1ca083b91ae2dd31ca0 (patch)
treef0afaef3a4b1ff4df7f7a162f1d091f7b72c2154
parent7adc67d8d060f269b8eb90d4f0d8f381a11b7cd5 (diff)
downloadvyatta-nat-c885af49e84e3714513ab1ca083b91ae2dd31ca0.tar.gz
vyatta-nat-c885af49e84e3714513ab1ca083b91ae2dd31ca0.zip
Fix rule prefix display for rules that are masquerade and exclude
at the same time.
-rwxr-xr-xscripts/vyatta-show-nat-rules.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/vyatta-show-nat-rules.pl b/scripts/vyatta-show-nat-rules.pl
index 554670c..c6e2d1e 100755
--- a/scripts/vyatta-show-nat-rules.pl
+++ b/scripts/vyatta-show-nat-rules.pl
@@ -42,7 +42,7 @@ my $src_level = "nat source rule";
my $dst_level = "nat destination rule";
my $level = undef;
-my $format1 = "%-5s %-16s %-58s";
+my $format1 = "%-6s %-16s %-58s";
my $format2 = " %-16s %-62s";
sub numerically { $a <=> $b; }
@@ -205,8 +205,8 @@ for $rule (@rules) {
$nrule->setupOrig("$level $rule");
next if defined $nrule->{_disable};
- $rulenum = "X" . $rule if defined $nrule->{_exclude};
- $rulenum = "M". $rule if defined $nrule->{_is_masq};
+ $rulenum = "X" . $rulenum if defined $nrule->{_exclude};
+ $rulenum = "M". $rulenum if defined $nrule->{_is_masq};
$protocol = $nrule->{_proto} if defined $nrule->{_proto};
$protocol = "proto-" . $protocol;
$interface = $nrule->{_inbound_if} if defined $nrule->{_inbound_if};