mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-27 10:03:41 +01:00
Allow 'optional' to work with 'maclist'
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6076 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
b560dbd418
commit
3a50a8a1be
@ -751,7 +751,7 @@ find_interface_by_mac() {
|
|||||||
# Determine if Interface is up
|
# Determine if Interface is up
|
||||||
#
|
#
|
||||||
interface_is_up() {
|
interface_is_up() {
|
||||||
[ -n "$(ip link ls dev $1 | grep -e '[<,]UP[,>]')" ]
|
[ -n "$(ip link ls dev $1 2> /dev/null | grep -e '[<,]UP[,>]')" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -759,8 +759,12 @@ sub setup_mac_lists( $ ) {
|
|||||||
add_command $chainref, " echo \"-A $chainref->{name} -s \$address -d 255.255.255.255 -j RETURN\" >&3";
|
add_command $chainref, " echo \"-A $chainref->{name} -s \$address -d 255.255.255.255 -j RETURN\" >&3";
|
||||||
add_command $chainref, " echo \"-A $chainref->{name} -s \$address -d 224.0.0.0/4 -j RETURN\" >&3";
|
add_command $chainref, " echo \"-A $chainref->{name} -s \$address -d 224.0.0.0/4 -j RETURN\" >&3";
|
||||||
add_command $chainref, ' done';
|
add_command $chainref, ' done';
|
||||||
|
|
||||||
|
unless ( interface_is_optional $interface ) {
|
||||||
add_command $chainref, 'else';
|
add_command $chainref, 'else';
|
||||||
add_command $chainref, " fatal_error \"Interface $interface must be up before Shorewall can start\"";
|
add_command $chainref, " fatal_error \"Interface $interface must be up before Shorewall can start\"";
|
||||||
|
}
|
||||||
|
|
||||||
add_command $chainref, "fi\n";
|
add_command $chainref, "fi\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3780,7 +3780,11 @@ __EOF__
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ "$LOG_MARTIANS" = yes ]; then
|
if [ "$LOG_MARTIANS" = yes ]; then
|
||||||
|
save_command "echo 1 > /proc/sys/net/ipv4/conf/all/log_martians"
|
||||||
save_command "echo 1 > /proc/sys/net/ipv4/conf/default/log_martians"
|
save_command "echo 1 > /proc/sys/net/ipv4/conf/default/log_martians"
|
||||||
|
else
|
||||||
|
save_command "echo 0 > /proc/sys/net/ipv4/conf/all/log_martians"
|
||||||
|
save_command "echo 0 > /proc/sys/net/ipv4/conf/default/log_martians"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user