forked from extern/shorewall_code
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;
|
local status;
|
||||||
status=0
|
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
|
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=$?
|
status=$?
|
||||||
|
else
|
||||||
|
status=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1028,10 +1030,12 @@ interface_is_usable() # $1 = interface
|
|||||||
local status;
|
local status;
|
||||||
status=0
|
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
|
if interface_is_up $1 && [ "$(find_first_interface_address_if_any $1)" != :: ]; then
|
||||||
run_isusable_exit $1
|
[ "$COMMAND" = enable ] || run_isusable_exit $1
|
||||||
status=$?
|
status=$?
|
||||||
|
else
|
||||||
|
status=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user