,----[ Albert Chu <[EMAIL PROTECTED]> ]
| Hi guys,
| Can the UDM-LAN interface return error codes back to the user? As
| far as I can tell, it can't.
|
| In unassemble_ipmi_lan_pkt2() there is:
|
| if (pkt_len != lan_packet_length)
| {
| free (tmpl_lan_packet);
| return (-1);
| }
|
| So if the packet is an "incorrect" length, an error code won't be
| parsed and returned.
`----
If we receive incomplete or corrupted packet, parsing (i.e. lesser or
greater bytes) would lead to memory faults. It is safer to drop the
packet instead.
Currently ipmi_lan_cmd2 checks for < or > length cases and reports to
STDERR stream to user to report to freeipmi-devel(at)gnu.org mailing
list. unassemble is called only in case of proper length. You may also
notice.
Also look at the recently introduced way to pass error messages.
ipmi_device_t has a field "errmsg[IPMI_ERR_STR_MAX_LEN]" to hold a
more detailed latest error string. If return codes are -1, high level
calls can use this string, instead of less informative "errno".
--
Anand Babu
GPG Key ID: 0x62E15A31
Blog [http://ab.freeshell.org]
The GNU Operating System [http://www.gnu.org]
Z RESEARCH [http://www.zresearch.com]
A Supercomputing Company.
_______________________________________________
Freeipmi-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/freeipmi-devel