It adds a sort of feature flag check_sdu_length in IpmiMsg constructor, which is enabled by default so the current behavior doesn't change.
When deactivated, this allows to ignore the verification len(pdu) = header_len + data_len. This will also return everything contained in the pdu[header_len:] array rather than just pdu[header_len:header_len + data_len] .
It only concerns legacy RMCP interface. I agree that the code should not be modified to complain with a buggy IPMI implementation, but I saw that ipmitool also ignore this verification when using legacy RMCP, so I thought this could be done here too.
The flag can be used when creating the IPMI interface :
Coverage: 67.021% (+0.03%) from 66.988% when pulling 9bf9087ca7eaa592da3560710fdd32922bd68720 on canteuni:ff_rmcp_payload_length into ba1d466a2a6126a680b0b4b197d595dc37438a5f on kontron:master.
This PR aims to solve the following issue #140 .
It adds a sort of feature flag
check_sdu_length
inIpmiMsg
constructor, which is enabled by default so the current behavior doesn't change.When deactivated, this allows to ignore the verification
len(pdu) = header_len + data_len
. This will also return everything contained in thepdu[header_len:]
array rather than justpdu[header_len:header_len + data_len]
.It only concerns legacy RMCP interface. I agree that the code should not be modified to complain with a buggy IPMI implementation, but I saw that
ipmitool
also ignore this verification when using legacy RMCP, so I thought this could be done here too.The flag can be used when creating the IPMI interface :