summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta-show-nat-rules.pl1
-rwxr-xr-xscripts/vyatta-show-nat.pl1
-rwxr-xr-xscripts/vyatta-update-nat.pl2
3 files changed, 4 insertions, 0 deletions
diff --git a/scripts/vyatta-show-nat-rules.pl b/scripts/vyatta-show-nat-rules.pl
index 206d409..a7b83da 100755
--- a/scripts/vyatta-show-nat-rules.pl
+++ b/scripts/vyatta-show-nat-rules.pl
@@ -172,6 +172,7 @@ for $rule (@rules) {
my $dst = new Vyatta::IpTables::AddressFilter;
$nrule->setupOrig("service nat rule $rule");
+ next if defined $nrule->{_disable};
$rulenum = "X" . $rule if defined $nrule->{_exclude};
$type = $nat_type{$nrule->{_type}};
$protocol = $nrule->{_proto} if defined $nrule->{_proto};
diff --git a/scripts/vyatta-show-nat.pl b/scripts/vyatta-show-nat.pl
index c933e05..574c995 100755
--- a/scripts/vyatta-show-nat.pl
+++ b/scripts/vyatta-show-nat.pl
@@ -53,6 +53,7 @@ my @rules = sort numerically @rules_pre;
for $rule (@rules) {
my $nrule = new Vyatta::NatRule;
$nrule->setupOrig("service nat rule $rule");
+ next if defined $nrule->{_disable};
my $ntype = $nrule->orig_type();
print RENDER " <row>\n";
print RENDER " <rule_num>$rule</rule_num>\n";
diff --git a/scripts/vyatta-update-nat.pl b/scripts/vyatta-update-nat.pl
index 6eeb924..bbbd4ff 100755
--- a/scripts/vyatta-update-nat.pl
+++ b/scripts/vyatta-update-nat.pl
@@ -126,6 +126,7 @@ for $rule (@rule_keys) {
exit 6;
}
foreach my $rule_str (@rule_strs) {
+ next if !defined $rule_str;
$cmd = "iptables -t nat -I $chain_name{$ntype} $ipt_rulenum{$ntype} " .
"$rule_str";
print OUT "$cmd\n";
@@ -156,6 +157,7 @@ for $rule (@rule_keys) {
# add the new rule(s)
foreach my $rule_str (@rule_strs) {
+ next if !defined $rule_str;
$cmd = "iptables -t nat -I $chain_name{$ntype} $ipt_rulenum{$ntype} " .
"$rule_str";
print OUT "$cmd\n";