mirror of
https://gitlab.com/shorewall/code.git
synced 2025-02-23 21:21:49 +01:00
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:
parent
51f53236ec
commit
dfdbdff286
@ -2369,6 +2369,7 @@ setup_mac_lists() {
|
|||||||
addresses="$mac"
|
addresses="$mac"
|
||||||
mac="$interface"
|
mac="$interface"
|
||||||
interface="$disposition"
|
interface="$disposition"
|
||||||
|
disposition=ACCEPT
|
||||||
target=RETURN
|
target=RETURN
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -2590,6 +2590,8 @@ setup_mac_lists() {
|
|||||||
while read disposition interface mac addresses; do
|
while read disposition interface mac addresses; do
|
||||||
expandv disposition interface mac addresses
|
expandv disposition interface mac addresses
|
||||||
|
|
||||||
|
level=
|
||||||
|
|
||||||
case $disposition in
|
case $disposition in
|
||||||
ACCEPT:*)
|
ACCEPT:*)
|
||||||
level=${disposition#*:}
|
level=${disposition#*:}
|
||||||
@ -2597,7 +2599,7 @@ setup_mac_lists() {
|
|||||||
target=RETURN
|
target=RETURN
|
||||||
;;
|
;;
|
||||||
ACCEPT)
|
ACCEPT)
|
||||||
disposition=RETURN
|
target=RETURN
|
||||||
;;
|
;;
|
||||||
REJECT:*)
|
REJECT:*)
|
||||||
[ $MACLIST_TABLE = mangle ] && fatal_error "DISPOSITION = REJECT is incompatible with MACLIST_TABLE=mangle"
|
[ $MACLIST_TABLE = mangle ] && fatal_error "DISPOSITION = REJECT is incompatible with MACLIST_TABLE=mangle"
|
||||||
@ -2606,6 +2608,7 @@ setup_mac_lists() {
|
|||||||
;;
|
;;
|
||||||
REJECT)
|
REJECT)
|
||||||
[ $MACLIST_TABLE = mangle ] && fatal_error "DISPOSITION = REJECT is incompatible with MACLIST_TABLE=mangle"
|
[ $MACLIST_TABLE = mangle ] && fatal_error "DISPOSITION = REJECT is incompatible with MACLIST_TABLE=mangle"
|
||||||
|
target=reject
|
||||||
;;
|
;;
|
||||||
DROP:*)
|
DROP:*)
|
||||||
level=${disposition#*:}
|
level=${disposition#*:}
|
||||||
@ -2613,12 +2616,14 @@ setup_mac_lists() {
|
|||||||
target=DROP
|
target=DROP
|
||||||
;;
|
;;
|
||||||
DROP)
|
DROP)
|
||||||
|
target=DROP
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
addresses="$mac"
|
addresses="$mac"
|
||||||
mac="$interface"
|
mac="$interface"
|
||||||
interface="$disposition"
|
interface="$disposition"
|
||||||
disposition=RETURN
|
disposition=ACCEPT
|
||||||
|
target=RETURN
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -2643,7 +2648,7 @@ setup_mac_lists() {
|
|||||||
if [ -z "$addresses" ]; then
|
if [ -z "$addresses" ]; then
|
||||||
fatal_error "You must specify a MAC address or an IP address"
|
fatal_error "You must specify a MAC address or an IP address"
|
||||||
else
|
else
|
||||||
mac=
|
maclist=
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
macpart=$(mac_match $mac)
|
macpart=$(mac_match $mac)
|
||||||
|
@ -874,13 +874,12 @@ reload_command() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
export NOROUTES
|
export NOROUTES
|
||||||
|
export PROGRAM=Yes
|
||||||
|
|
||||||
[ -n "$nolock" ] || mutex_on
|
[ -n "$nolock" ] || mutex_on
|
||||||
|
|
||||||
progress_message3 "Compiling..."
|
progress_message3 "Compiling..."
|
||||||
|
|
||||||
export PROGRAM=Yes
|
|
||||||
|
|
||||||
if $SHOREWALL_SHELL /usr/share/shorewall/compiler $debugging $nolock compile /var/lib/shorewall/.reload; then
|
if $SHOREWALL_SHELL /usr/share/shorewall/compiler $debugging $nolock compile /var/lib/shorewall/.reload; then
|
||||||
progress_message3 "Installing..."
|
progress_message3 "Installing..."
|
||||||
/var/lib/shorewall/.reload reload
|
/var/lib/shorewall/.reload reload
|
||||||
|
Loading…
Reference in New Issue
Block a user