diff options
-rwxr-xr-x | scripts/vyatta-show-nat-rules.pl | 5 |
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; |