kontron / python-ipmi

A pure python IPMI library
GNU Lesser General Public License v2.1
187 stars 75 forks source link

GetChassisStatusRsp did not handle optional byte in response data #13

Closed hustbeta closed 8 years ago

hustbeta commented 8 years ago

From the ipmi 2.0 spec, 28.2 Get Chassis Status Command, there is an optional extra byte in response data. So the response could be 5 bytes. But GetChassisStatusRsp handles 4 bytes only, which will raise DecodingError('Data has extra bytes'). I have came across this problem on some HP servers, they returned the optional byte as 0x00.

I am not familiar with the source code, maybe appending a RemainingBytes to GetChassisStatusRsp will solve the issue?

hthiery commented 8 years ago

indeed this extra bytes is not handled.

hthiery commented 8 years ago

It is fixed by adding "optional" field.