arcress0 / ipmiutil

ipmiutil is an easy to use set of IPMI server management utilities. It can get/set sensor readings & thresholds, automate SEL management, do SOL console, etc. Supports Linux, Windows, BSD, Solaris, MacOSX. The only IPMI project tool that runs natively on Windows. See http://ipmiutil.sf.net for rpms, etc. (formerly called panicsel). It can run driverless in Linux for use on boot media or embedded environments.
BSD 3-Clause "New" or "Revised" License
33 stars 5 forks source link

ipmiutil hpm upgrade doesn't work #13

Closed taih304 closed 1 year ago

taih304 commented 1 year ago

I guess this gonna be a long description but stick with me.

The function ipmi_lan_poll_recv get called recursively again but BMC doesn't respond until it get the next request that's why in the next iteration the response is NULL resulting in the retry process and then close session.

So the issue lies in that if function which it check specifically for 0x34 command, I put some code to bypass that if function and can upgrade hpm successfully. Therefore I think we need some extra logic in this if function so it won't be mistaken with the get upgrade status command (netfn: 0x2c, command: 0x34).

I don't fully understand the bridge feature in IPMI but I know that this (netfn: 0x2c, command: 0x34) has nothing to do with it. I also take a look in this commit from ipmitool repo link and I think we need to add the check for netfn as well.

Please let me know if I need to add something else here

arcress0 commented 1 year ago

Thank you for the detail and debug work. Yes, adding the check for netfn 0x06 or 0x07 + command 0x34 should resolve this issue.

arcress0 commented 1 year ago

I have applied a fix to lib/lanplus/lanplus.c in github now. If you want me to do a build for it, let me know which OS.

taih304 commented 1 year ago

Awesome, the patch can fix the issue. Please build it for linux and window. Thank you, really appreciate your help

arcress0 commented 1 year ago

Getting back to this. Didn't I send you the binary? Here is one for Linux CentOS7:
https://ipmiutil.sourceforge.net/FILES/ipmiutil-3.1.9-3.el7.x86_64.rpm

taih304 commented 1 year ago

Thanks a lot, closing this issue