From: Jean Delvare Subject: ipmitool: Fix assertion failure in ipmi_lanplus_send_payload If sending the payload doesn't work and we have to retry, the assertions on session state will fail because we have already updated them to the next step. So, restore the initial state upon retry. --- src/plugins/lanplus/lanplus.c | 5 +++++ 1 file changed, 5 insertions(+) --- ipmitool-1.8.11.orig/src/plugins/lanplus/lanplus.c +++ ipmitool-1.8.11/src/plugins/lanplus/lanplus.c @@ -2084,6 +2084,7 @@ ipmi_lanplus_send_payload( uint8_t * msg_data; int msg_length; struct ipmi_session * session = intf->session; + enum LANPLUS_SESSION_STATE saved_state = session->v2_data.session_state; int try = 0; int xmit = 1; time_t ltime; @@ -2094,6 +2095,10 @@ ipmi_lanplus_send_payload( while (try < session->retry) { ltime = time(NULL); + /* Restore initial session state on retry */ + if (try) + session->v2_data.session_state = saved_state; + if (xmit) { if (payload->payload_type == IPMI_PAYLOAD_TYPE_IPMI)