From c0a551c05696666251e208e31b7fa9ecb6a06194 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Thu, 8 Dec 2011 21:38:17 +0700 Subject: Bug #3888: Issue a warning message if source NAT translation address does not exist on the system. --- lib/Vyatta/SrcNatRule.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') 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}) -- cgit v1.2.3