From 71480ff6475d0dbe28906abc09307a198c687bc3 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sat, 13 Aug 2011 15:59:42 -0700 Subject: [PATCH] Validate nets in the netmap file. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Nat.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Shorewall/Perl/Shorewall/Nat.pm b/Shorewall/Perl/Shorewall/Nat.pm index d4c52a416..9ef690722 100644 --- a/Shorewall/Perl/Shorewall/Nat.pm +++ b/Shorewall/Perl/Shorewall/Nat.pm @@ -409,6 +409,9 @@ sub setup_netmap() { my ( $type, $net1, $interfacelist, $net2, $net3 ) = split_line 4, 5, 'netmap file'; + validate_net $net1, 0; + validate_net $net2, 0; + $net3 = ALLIP if $net3 eq '-'; for my $interface ( split_list $interfacelist, 'interface' ) {