2
0
mirror of https://opendev.org/x/pyghmi synced 2025-08-30 06:48:07 +00:00

Fix server session to properly support rqlun

Honor rqlun from client, if not zero.  There are BMC implementations
that fail to follow the spec and do rqlun of zero, but pyghmi
implements it correctly.  In practice I have never seen an
rqlun of non-zero except as an experiment.

Closes-Bug: #1865987

Change-Id: I73e59672ce5e146cf24386c2228fa8dae3bc579c
This commit is contained in:
Jarrod Johnson
2020-03-04 08:35:03 -05:00
parent a3001d87a7
commit 51ab5ca823
2 changed files with 2 additions and 0 deletions

View File

@@ -72,6 +72,7 @@ class ServerSession(ipmisession.Session):
self.sessionid = 0
self.bmc = bmc
self.lastpayload = None
self.rqlun = None # This will be provided by the client
self.broken = False
self.authtype = 6
self.integrityalgo = 0

View File

@@ -1626,6 +1626,7 @@ class Session(object):
self.seqlun = payload[4] >> 2
self.clientaddr = payload[3]
self.clientnetfn = (payload[1] >> 2) + 1
self.rqlun = payload[4] & 0b11
self.clientcommand = payload[5]
self._parse_payload(payload)
return