Fix bug in 'interface_is_usable'

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-05-15 06:58:03 -07:00
parent ac2ed505bb
commit 63ae00e4a4

View File

@ -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