From 0f6d348187187b627fa482b03d0f6f338acdb634 Mon Sep 17 00:00:00 2001 From: teastep Date: Tue, 29 Apr 2008 16:58:36 +0000 Subject: [PATCH] More cleanup of maclist processing git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8488 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Rules.pm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Shorewall-perl/Shorewall/Rules.pm b/Shorewall-perl/Shorewall/Rules.pm index 31b4ffe2d..3bfd8cca4 100644 --- a/Shorewall-perl/Shorewall/Rules.pm +++ b/Shorewall-perl/Shorewall/Rules.pm @@ -734,18 +734,14 @@ sub setup_mac_lists( $ ) { my $targetref = $maclist_targets{$disposition}; - fatal_error "Invalid DISPOSITION ($original_disposition)" if ! $targetref || ( ( $table eq 'mangle' ) && ! $targetref->{mangle} ); - - fatal_error "Unknown Interface ($interface)" unless known_interface( $interface ); - - unless ( $maclist_interfaces{$interface} ) { - fatal_error "No hosts on $interface have the maclist option specified"; - } + fatal_error "Invalid DISPOSITION ($original_disposition)" if ! $targetref || ( ( $table eq 'mangle' ) && ! $targetref->{mangle} ); + fatal_error "Unknown Interface ($interface)" unless known_interface( $interface ); + fatal_error "No hosts on $interface have the maclist option specified" unless $maclist_interfaces{$interface}; my $chainref = $chain_table{$table}{( $ttl ? macrecent_target $interface : mac_chain $interface )}; $mac = '' unless $mac && ( $mac ne '-' ); - $addresses = '' unless $addresses && ( $addresses ne '-' ); + $addresses = '' unless defined $addresses && ( $addresses ne '-' ); fatal_error "You must specify a MAC address or an IP address" unless $mac || $addresses;