freeipmi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Freeipmi-devel] Re: UDM error codes


From: Anand Babu
Subject: [Freeipmi-devel] Re: UDM error codes
Date: Thu, 02 Feb 2006 15:37:25 -0800
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

,----[ Albert Chu <address@hidden> ]
| 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]