summaryrefslogtreecommitdiff
path: root/scripts/vyatta-update-nat.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/vyatta-update-nat.pl')
-rwxr-xr-xscripts/vyatta-update-nat.pl2
1 files changed, 2 insertions, 0 deletions
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";