Fix maclist verification

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3363 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-01-23 22:59:24 +00:00
parent 51f53236ec
commit dfdbdff286
3 changed files with 10 additions and 5 deletions

View File

@ -2369,6 +2369,7 @@ setup_mac_lists() {
addresses="$mac"
mac="$interface"
interface="$disposition"
disposition=ACCEPT
target=RETURN
;;
esac

View File

@ -2590,6 +2590,8 @@ setup_mac_lists() {
while read disposition interface mac addresses; do
expandv disposition interface mac addresses
level=
case $disposition in
ACCEPT:*)
level=${disposition#*:}
@ -2597,7 +2599,7 @@ setup_mac_lists() {
target=RETURN
;;
ACCEPT)
disposition=RETURN
target=RETURN
;;
REJECT:*)
[ $MACLIST_TABLE = mangle ] && fatal_error "DISPOSITION = REJECT is incompatible with MACLIST_TABLE=mangle"
@ -2606,6 +2608,7 @@ setup_mac_lists() {
;;
REJECT)
[ $MACLIST_TABLE = mangle ] && fatal_error "DISPOSITION = REJECT is incompatible with MACLIST_TABLE=mangle"
target=reject
;;
DROP:*)
level=${disposition#*:}
@ -2613,12 +2616,14 @@ setup_mac_lists() {
target=DROP
;;
DROP)
target=DROP
;;
*)
addresses="$mac"
mac="$interface"
interface="$disposition"
disposition=RETURN
disposition=ACCEPT
target=RETURN
;;
esac
@ -2643,7 +2648,7 @@ setup_mac_lists() {
if [ -z "$addresses" ]; then
fatal_error "You must specify a MAC address or an IP address"
else
mac=
maclist=
fi
else
macpart=$(mac_match $mac)

View File

@ -874,13 +874,12 @@ reload_command() {
esac
export NOROUTES
export PROGRAM=Yes
[ -n "$nolock" ] || mutex_on
progress_message3 "Compiling..."
export PROGRAM=Yes
if $SHOREWALL_SHELL /usr/share/shorewall/compiler $debugging $nolock compile /var/lib/shorewall/.reload; then
progress_message3 "Installing..."
/var/lib/shorewall/.reload reload