From ea0a8d09d18782c7b4f8ca799b04c2913e76c339 Mon Sep 17 00:00:00 2001 From: teastep Date: Sun, 22 Apr 2007 14:42:07 +0000 Subject: [PATCH] Improve interface BROADCAST handling git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6059 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Interfaces.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Shorewall-perl/Shorewall/Interfaces.pm b/Shorewall-perl/Shorewall/Interfaces.pm index d4dba4e19..47ec926ff 100644 --- a/Shorewall-perl/Shorewall/Interfaces.pm +++ b/Shorewall-perl/Shorewall/Interfaces.pm @@ -208,7 +208,14 @@ sub validate_interfaces_file() $interfaces{$interface}{root} = $interface; } - warning_message 'Shorewall no longer uses broadcast addresses in rule generation:' . $networks if $networks && $networks ne 'detect'; + unless ( $networks eq '' || $networks eq 'detect' ) { + + for my $address ( split /,/, $networks ) { + fatal_error 'Invalid BROADCAST address' unless $address =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + } + + warning_message 'Shorewall no longer uses broadcast addresses in rule generation'; + } my $optionsref = {};