diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2010-06-10 13:48:29 -0700 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2010-06-10 13:48:29 -0700 |
commit | aceae8d68a6ce4ce173e20195cd374332e273b93 (patch) | |
tree | df8b1cb12d9669ffaf03155123c40845450f3eef /scripts | |
parent | 07420cd1508a79c6af64538a4ef08ab5839e1bf6 (diff) | |
download | vyatta-nat-aceae8d68a6ce4ce173e20195cd374332e273b93.tar.gz vyatta-nat-aceae8d68a6ce4ce173e20195cd374332e273b93.zip |
start fresh for each conntrack call
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-nat-translations.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/vyatta-nat-translations.pl b/scripts/vyatta-nat-translations.pl index 256ae70..91caa3d 100755 --- a/scripts/vyatta-nat-translations.pl +++ b/scripts/vyatta-nat-translations.pl @@ -246,8 +246,9 @@ if (defined $xml_file) { } $xml = `sudo $conntrack -L -n $ipopt -o xml $proto 2>/dev/null`; chomp $xml; + $data = undef; $data = $xs->XMLin($xml) if ! $xml eq ''; - nat_print_xml($data, 'snat'); + nat_print_xml($data, 'snat') if defined $data; } if ($mode eq 'both' or $mode eq 'dnat') { my $ipopt = ""; @@ -256,8 +257,9 @@ if (defined $xml_file) { } $xml = `sudo $conntrack -L -g $ipopt -o xml $proto 2>/dev/null`; chomp $xml; + $data = undef; $data = $xs->XMLin($xml) if ! $xml eq ''; - nat_print_xml($data, 'dnat'); + nat_print_xml($data, 'dnat') if defined $data; } } |