All,

We have run across the following problem when using the ipmitool lanplus interface to perform bridged IPMI commands (using the -b -t or -m switches in conjunction with -I lanplus). Use of lanplus and bridging will result in a "Close Session command failure".

This problem is due to two issues in the code.

1. ipmi_lan_poll_recv does not properly return the ipmi response packet
   pointer on a successful bridged requests.

1. The ipmi_close_session_cmd does not set the target address to the
   BMC before issuing the close.

This lanplus problem is specific to bridged commands because these are the only cases where the target address in the interface structure is modified from its compile time initial value of (IPMI_BMC_SLAVE_ADDR).

In bridged case, the open will always be done with the target_address set to IPMI_BMC_SLAVE_ADDR. but the subsequent bridged command request modifies the target_address based on the specified command line arguments to -b, -t or -m. When the close is finally done, the target_address in the interface structure used for close no longer correctly addresses the BMC, so the close fails.

Note: The lan interface, lan_close_session_cmd, correctly sets the target address to IPMI_BMC_SLAVE_ADDR so the lan interface does not have this issue.

I've attached a patch with does resolve the "Close Session command failure" for lanplus. Please let me know if I correctly characterized the problem and applied a correct solution.


-- Jim Mankovich | jm...@hp.com --

diff --git a/src/plugins/lanplus/lanplus.c b/src/plugins/lanplus/lanplus.c
index 474cbb0..604fb11 100644
--- a/src/plugins/lanplus/lanplus.c
+++ b/src/plugins/lanplus/lanplus.c
@@ -743,8 +743,7 @@ ipmi_lan_poll_recv(struct ipmi_intf * intf)
 					         " waiting for next answer... ");
       				ipmi_req_remove_entry(rsp->payload.ipmi_response.rq_seq,
 								rsp->payload.ipmi_response.cmd);
-                  ipmi_lan_poll_recv(intf);
-                  return;
+                  return ipmi_lan_poll_recv(intf);
 					}
 					else
 					{		
@@ -2702,6 +2701,7 @@ ipmi_close_session_cmd(struct ipmi_intf * intf)
 
 	backupBridgePossible = bridgePossible;
 
+	intf->target_addr = IPMI_BMC_SLAVE_ADDR;
 	bridgePossible = 0;
 
 	bmc_session_lsbf = intf->session->v2_data.bmc_id;
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel

Reply via email to