Compare commits

...

2 Commits

Author SHA1 Message Date
Tom Eastep
ec21b03c5b Correct handling of dbl=src_dst in interface OPTIONS
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-05-18 10:18:09 -07:00
Tom Eastep
25dcf8c5d6 Check for linkdown in interface_is_usable() rather than ..._is_up().
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-05-18 07:56:06 -07:00
2 changed files with 4 additions and 4 deletions

View File

@@ -810,7 +810,7 @@ sub add_common_rules ( $ ) {
$dbl_dst_target = $dbl_src_target;
}
} elsif ( $dbl_level ) {
my $chainref = set_optflags( new_standard_chain( $dbl_src_target = 'dbl_log' ) , DONT_OPTIMIZE | DONT_DELETE );
my $chainref = set_optflags( new_standard_chain( $dbl_src_target = $dbl_dst_target = 'dbl_log' ) , DONT_OPTIMIZE | DONT_DELETE );
log_rule_limit( $dbl_level,
$chainref,

View File

@@ -192,7 +192,7 @@ find_default_interface() {
# Determine if Interface is up
#
interface_is_up() {
[ -n "$($IP -$g_family link list dev $1 2> /dev/null | grep -e '[<,]UP[,>]' | grep -v ' state DOWN ')" ]
[ -n "$($IP -$g_family link list dev $1 2> /dev/null | grep -e '[<,]UP[,>]')" ]
}
#
@@ -675,7 +675,7 @@ interface_is_usable() # $1 = interface
status=0
if ! loopback_interface $1; then
if interface_is_up $1 && [ "$(find_first_interface_address_if_any $1)" != 0.0.0.0 ]; then
if interface_is_up $1 && [ "$(find_first_interface_address_if_any $1)" != 0.0.0.0 ] && [ -z "$($IP -$g_family link list dev $1 2> /dev/null | fgrep 'state DOWN')" ]; then
if [ "$COMMAND" != enable ]; then
[ ! -f ${VARDIR}/${1}_disabled ] && run_isusable_exit $1
status=$?
@@ -1101,7 +1101,7 @@ interface_is_usable() # $1 = interface
status=0
if [ "$1" != lo ]; then
if interface_is_up $1 && [ "$(find_first_interface_address_if_any $1)" != :: ]; then
if interface_is_up $1 && [ "$(find_first_interface_address_if_any $1)" != :: ] && [ -z "$($IP -$g_family link list dev $1 2> /dev/null | fgrep 'state DOWN')" ]; then
if [ "$COMMAND" != enable ]; then
[ ! -f ${VARDIR}/${1}_disabled ] && run_isusable_exit $1
status=$?