From 51ab5ca823b6d15ebaf3b9d405698259fdcfbcfe Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 4 Mar 2020 08:35:03 -0500 Subject: [PATCH] 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 --- pyghmi/ipmi/private/serversession.py | 1 + pyghmi/ipmi/private/session.py | 1 + 2 files changed, 2 insertions(+) diff --git a/pyghmi/ipmi/private/serversession.py b/pyghmi/ipmi/private/serversession.py index 1b422fbc..778371b6 100644 --- a/pyghmi/ipmi/private/serversession.py +++ b/pyghmi/ipmi/private/serversession.py @@ -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 diff --git a/pyghmi/ipmi/private/session.py b/pyghmi/ipmi/private/session.py index 937d2907..bffd56d6 100644 --- a/pyghmi/ipmi/private/session.py +++ b/pyghmi/ipmi/private/session.py @@ -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