mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-11 19:17:22 +00:00
Fix a proplem when using bridged IPMI commands on the lanplus interface (-I
lanplus with -b -t or -m switches) resulting in "Close Session command failure".
This commit is contained in:
parent
6e5043f289
commit
062bd1f9a4
@ -717,47 +717,36 @@ ipmi_lan_poll_recv(struct ipmi_intf * intf)
|
|||||||
|
|
||||||
if (entry != NULL) {
|
if (entry != NULL) {
|
||||||
lprintf(LOG_DEBUG+2, "IPMI Request Match found");
|
lprintf(LOG_DEBUG+2, "IPMI Request Match found");
|
||||||
if (
|
if ( intf->target_addr != intf->my_addr &&
|
||||||
intf->target_addr != intf->my_addr
|
bridgePossible &&
|
||||||
&&
|
rsp->data_len &&
|
||||||
bridgePossible
|
rsp->payload.ipmi_response.cmd == 0x34 &&
|
||||||
&&
|
(rsp->payload.ipmi_response.netfn == 0x06 ||
|
||||||
rsp->data_len
|
rsp->payload.ipmi_response.netfn == 0x07) &&
|
||||||
&&
|
rsp->payload.ipmi_response.rs_lun == 0 )
|
||||||
rsp->payload.ipmi_response.cmd == 0x34
|
|
||||||
&&
|
|
||||||
(
|
|
||||||
rsp->payload.ipmi_response.netfn == 0x06
|
|
||||||
||
|
|
||||||
rsp->payload.ipmi_response.netfn == 0x07
|
|
||||||
)
|
|
||||||
&&
|
|
||||||
rsp->payload.ipmi_response.rs_lun == 0
|
|
||||||
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
/* Check completion code */
|
/* Check completion code */
|
||||||
if (rsp->data[offset-1] == 0)
|
if (rsp->data[offset-1] == 0)
|
||||||
{
|
{
|
||||||
lprintf(LOG_DEBUG, "Bridged command answer,"
|
lprintf(LOG_DEBUG, "Bridged command answer,"
|
||||||
" waiting for next answer... ");
|
" waiting for next answer... ");
|
||||||
ipmi_req_remove_entry(rsp->payload.ipmi_response.rq_seq,
|
ipmi_req_remove_entry(
|
||||||
rsp->payload.ipmi_response.cmd);
|
rsp->payload.ipmi_response.rq_seq,
|
||||||
ipmi_lan_poll_recv(intf);
|
rsp->payload.ipmi_response.cmd);
|
||||||
return;
|
return ipmi_lan_poll_recv(intf);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lprintf(LOG_DEBUG, "WARNING: Bridged "
|
lprintf(LOG_DEBUG, "WARNING: Bridged "
|
||||||
"cmd ccode = 0x%02x",
|
"cmd ccode = 0x%02x",
|
||||||
rsp->data[offset-1]);
|
rsp->data[offset-1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rsp->data_len &&
|
if (rsp->data_len &&
|
||||||
rsp->payload.ipmi_response.cmd == 0x34) {
|
rsp->payload.ipmi_response.cmd == 0x34) {
|
||||||
memcpy(rsp->data, &rsp->data[offset],(rsp->data_len-offset));
|
memcpy(rsp->data, &rsp->data[offset],
|
||||||
printbuf(
|
(rsp->data_len-offset));
|
||||||
&rsp->data[offset],
|
printbuf( &rsp->data[offset],
|
||||||
(rsp->data_len-offset),
|
(rsp->data_len-offset),
|
||||||
"bridge command response");
|
"bridge command response");
|
||||||
}
|
}
|
||||||
@ -2702,6 +2691,7 @@ ipmi_close_session_cmd(struct ipmi_intf * intf)
|
|||||||
|
|
||||||
backupBridgePossible = bridgePossible;
|
backupBridgePossible = bridgePossible;
|
||||||
|
|
||||||
|
intf->target_addr = IPMI_BMC_SLAVE_ADDR;
|
||||||
bridgePossible = 0;
|
bridgePossible = 0;
|
||||||
|
|
||||||
bmc_session_lsbf = intf->session->v2_data.bmc_id;
|
bmc_session_lsbf = intf->session->v2_data.bmc_id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user