fence_xvm: Fix incorrect success return codes
PATCH 1/1 fence_xvm: Fix incorrect success return codes
This patch fixes two places where fence_xvm will return success for fencing operations when fencing has failed due to the challenge/response failing.
Signed-off-by Ryan McCabe <[email protected]>
--- fence/agents/xvm/fence_xvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fence/agents/xvm/fence_xvm.c +2 -2
@@ -99,14 +99,14 @@ tcp_exchange(int fd, fence_auth_type_t auth, void *key,if (tcp_challenge (fd, auth, key, key_len, timeout) <=0 ) {/* Challenge failed */ printf ("Invalid response to challenge\n" ); -return 0 ; +return 1 ; }/* Now they'll send us one, so we need to respond here */ dbg_printf (3 ,"Responding to TCP challenge\n" );if (tcp_response (fd, auth, key, key_len, timeout) <=0 ) {printf ("Invalid response to challenge\n" ); -return 0 ; +return 1 ; }dbg_printf (2 ,"TCP Exchange + Authentication done... \n" );
Signature · 1 line
1.7.10.4
PATCH 1/1 fence_xvm: Fix incorrect success return codes
Quoted 3 lines · Ryan McCabe
This patch fixes two places where
fence_xvmwill return success for fencing operations when fencing has failed due to the challenge/response failing.
Resolves: rhbz#843083
ACK.
-- Lon