Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Fix the issue that client without protocol version set cannot talk to server with protocol version check. #1106

Merged
merged 3 commits into from
Mar 29, 2017
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions esx_service/vmdk_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -1491,8 +1491,9 @@ def execRequestThread(client_socket, cartel, request):
send_vmci_reply(client_socket, reply_string)
else:
logging.debug("execRequestThread: req=%s", req)
# If req from client does not include version number, set the version to "1" by default
client_protocol_version = int(req["version"]) if "version" in req else 1
# If req from client does not include version number, set the version to
# SERVER_PROTOCOL_VERSION by default
client_protocol_version = int(req["version"]) if "version" in req else SERVER_PROTOCOL_VERSION
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Looks like original implementation did consider backward compatibility but hardcoded version, 1, broke it!

logging.debug("execRequestThread: version=%d", client_protocol_version)
if client_protocol_version != SERVER_PROTOCOL_VERSION:
if client_protocol_version < SERVER_PROTOCOL_VERSION:
Expand Down