summaryrefslogtreecommitdiff
path: root/scripts/vyatta-update-nat.pl
diff options
context:
space:
mode:
authorMohit Mehta <mohit.mehta@vyatta.com>2009-07-24 14:16:57 -0700
committerMohit Mehta <mohit.mehta@vyatta.com>2009-07-24 14:16:57 -0700
commitbd8612731a3b4f2199e528e528a27cc2151c0350 (patch)
tree95638f942aea85b53329c95da0b74c3dee3a6aad /scripts/vyatta-update-nat.pl
parent51acfc88f15093f76467fa289f2ca2b2a0fa034e (diff)
downloadvyatta-nat-bd8612731a3b4f2199e528e528a27cc2151c0350.tar.gz
vyatta-nat-bd8612731a3b4f2199e528e528a27cc2151c0350.zip
add support for disabling a NAT rule
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";