diff options
author | Daniil Baturin <daniil.baturin@vyatta.com> | 2011-12-08 21:38:17 +0700 |
---|---|---|
committer | Daniil Baturin <daniil.baturin@vyatta.com> | 2011-12-08 21:38:17 +0700 |
commit | c0a551c05696666251e208e31b7fa9ecb6a06194 (patch) | |
tree | 92891ca67e2584ba8bbf03335303502f3f9d596f | |
parent | abb2ff29469d4b05fde36654ed6d5f584867183f (diff) | |
download | vyatta-nat-c0a551c05696666251e208e31b7fa9ecb6a06194.tar.gz vyatta-nat-c0a551c05696666251e208e31b7fa9ecb6a06194.zip |
Bug #3888: Issue a warning message if source NAT translation address
does not exist on the system.
-rw-r--r-- | lib/Vyatta/SrcNatRule.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Vyatta/SrcNatRule.pm b/lib/Vyatta/SrcNatRule.pm index bdfe199..49ec119 100644 --- a/lib/Vyatta/SrcNatRule.pm +++ b/lib/Vyatta/SrcNatRule.pm @@ -203,6 +203,10 @@ sub rule_str { } else { return ("\"$addr\" is not a valid IP address", undef) if (!Vyatta::TypeChecker::validateType('ipv4', $addr, 1)); + + print("Warning: IP address $addr does not exist on the system!\n") + if !(is_local_address($addr)); + $to_src .= $addr; } } elsif (defined($self->{_outside_addr}->{_range}->{_start}) |