mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-08 16:54:10 +01:00
Fix bug in 'interface_is_usable'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
ac2ed505bb
commit
63ae00e4a4
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user