summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniil Baturin <daniil.baturin@vyatta.com>2012-01-04 01:09:26 +0700
committerDaniil Baturin <daniil.baturin@vyatta.com>2012-01-04 01:09:26 +0700
commitb8a966411c00e76d04db69d003c5fab15319f2ce (patch)
tree486f9e0539fac2dbfba4a26e0d3cb839b9b6a275 /scripts
parentb2b78b7c6162eb9c69a2da5d11e417bf2fc78bbf (diff)
downloadvyatta-nat-b8a966411c00e76d04db69d003c5fab15319f2ce.tar.gz
vyatta-nat-b8a966411c00e76d04db69d003c5fab15319f2ce.zip
Don't display translation address for masquerade rules
for any interface.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta-show-nat-rules.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/vyatta-show-nat-rules.pl b/scripts/vyatta-show-nat-rules.pl
index 72a7899..7f950f0 100755
--- a/scripts/vyatta-show-nat-rules.pl
+++ b/scripts/vyatta-show-nat-rules.pl
@@ -223,6 +223,11 @@ for $rule (@rules) {
my $raw_translation_addr = get_inout_address("$level $rule", "_outside_addr");
if ($raw_translation_addr eq "masquerade") {
$translation_addr = get_primary_addr($interface);
+ # if translation address is empty after that,
+ # it's a masquerade rule for any interface
+ if ($translation_addr eq '') {
+ $translation_addr = "ANY";
+ }
}
else {
$translation_addr = $raw_translation_addr;