diff --git a/Shorewall/lib.core b/Shorewall/lib.core index 5cc160d91..a8b5ea222 100644 --- a/Shorewall/lib.core +++ b/Shorewall/lib.core @@ -629,10 +629,12 @@ interface_is_usable() # $1 = interface local status; status=0 - if [ "$1" != lo -a "$COMMAND" != enable ]; then + if [ "$1" != lo ]; then if interface_is_up $1 && [ "$(find_first_interface_address_if_any $1)" != 0.0.0.0 ]; then - run_isusable_exit $1 + [ "$COMMAND" = enable ] || run_isusable_exit $1 status=$? + else + status=1 fi fi @@ -1028,10 +1030,12 @@ interface_is_usable() # $1 = interface local status; status=0 - if [ "$1" != lo -a "$COMMAND" != enable ]; then + if [ "$1" != lo ]; then if interface_is_up $1 && [ "$(find_first_interface_address_if_any $1)" != :: ]; then - run_isusable_exit $1 + [ "$COMMAND" = enable ] || run_isusable_exit $1 status=$? + else + status=1 fi fi