Commit changes a dummy interface in a way that it acts as a dummy interface when
no IPMI_DUMMY_SOCK env variable is set. Therefore, it's possible to run
'ekanalyzer frushow' without having BMC. Still, you need to specify this IPMI
interface.
If IPMI_DUMMY_SOCK is set, then dummy interface will work as it was working
before.
Commit adds macros and #include in order to bring down the number of `warning:
implicit declaration of function 'X' [-Wimplicit-function-declaration]`
warnings.
Move the logic that checks the session ID from read_session_data_v2x
function to the ipmi_lan_poll_single function in order to avoid calling
assert in this case. We can continue with the next packet if we detect
a session ID mismatch.
Signed-off-by: Boris Ranto <branto@redhat.com>
NI_MAXHOST and NI_MAXSERV is only defined in /usr/include/netdb.h if
_DARWIN_C_SOURCE is defined or _POSIX_C_SOURCE is undefined.
From /usr/include/netdb.h OS 10.11 - El Capitan:
/*
* Constants for getnameinfo()
*/
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
#define NI_MAXHOST 1025
#define NI_MAXSERV 32
#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
Boards equipped with 'dumb' Intel MAC can do only SOL. IPMITool performs
several autodetection requests before initiating SOL, which are not
recognized by the boards. With each request retried 5 times it takes
about 30 seconds to establish SOL. This patch resolves the problem.
Commit implements '-4' and '-6' switch in order to enforce IPv4 or IPv6
connection. In order to do so, struct ipmi_intf has been extended to carry
ai_family flag.
The current USB plugin doesn't find my IPMI channel:
# ipmitool -I usb mc info
Error in USB session setup
Unable to setup interface usb
Error loading interface usb
This is beacuse I have more than 8 scsi-generic devices that identify
as AMI:
# grep -c ^AMI /proc/scsi/sg/device_strs
13
So we end up hitting the max in FindG2CDROM, and abort without finding
the actual IPMI endpoint (on my system, this is /dev/sg11).
This change bumps that maximum up to 16.
However, that means we hit another bug in scsiProbeNew, where if
we hit the end of the file without completely filling the array,
we return with an error. This change handles the EOF condition
gracefully instead.
Also, fp is never going to become NULL; we don't need to check for that
condition.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
This feature request is for adding support for USB Medium as an interface in
IPMITool. AMI BMC (OEM feature) provides Virtual USB devices in the host as
part of its feature list. IPMITool can use this 'Virtual USB device' as a
medium for Inband communication with BMC.
Just like any other interface, use can just give 'ipmitool -I usb xxxx' to
communicate with the BMC via USB Interface.
Request/response matching for bridged and double-bridged requests is broken.
This patch reworks the sending and command construction code, and fixes the
response matching problems.
Since the polling code is retried several times, it was moved into a separate
function in order to make the code more readable.
Commit for: Dmitry Bazhenov
1. my_addr is not set if an interface does not expose set_my_addr.
Currently, the only interface which requires some special handling to set
my_addr is OpenIPMI. But changing of my_addr still needed for other interfaces.
So, we must set it regardless of presence of set_my_addr().
2. Since set_my_addr() for serial interfaces only sets my_addr, we remove them
as redundand.
3. Bridging is enabled when either trasit_addr or target_addr is not 0.
Currentle transit_addr is not regarded.
4. target_lun does not relate to briging. It is needed for "raw" command. We
set it regardles of bridging.
Commit for: Dmitry Bazhenov
When bridging is used (-t specifies an address which is different from 20h),
presession command must go to BMC_SLAVE_ADDR, not to target_addr.
BMC_SLAVE_ADDR is always used as the responder address in outer Send Message
request, when message is forwarded. Use the same approach for non-bridged
commands.
Commit for: Dmitry Bazhenov
When closing, LAN and LAN+ interfaces do not do proper cleaning of request
entries. Some pointers remain non NULL. This may cause bad memory references.
Commit for: Dmitry Bazhenov
Negative value returned by serial_read_line() function was not properly
recognized, since the storage type was unsigned. This caused ipmitool crash in
some sutuations. This patch fixes the problem.
Commit for: Dmitry Bazhenov
Currently, interface-management code in the ipmitool does not allow safe
interface re-opening (i.e. closing and opening again). It is because the session
is allocated in the interface setup callback while is freed in the close
callback. So, normal re-opening of the interface, which can be required for
example durng the HPM.1 upgrade, leads to segmentation fault. That's why in the
ipmi_hpmfwupg.c instead of normal closing interface, directly access the
interface data for subsequent re-opening.
Commit for Dmitry Bazhenov
Commit fixes compilation of IMB driver under Cygwin.
* don't redefine PAGESIZE if defined already
* fix missing include of <asm/socket.h> - required by IO calls
Commit replaces caddr_t in IMB driver with char *. This is a wild guess
replacement, because caddr_t doesn't have to be char *. However, it shouldn't be
used and so shouldn't mmap(). So we'll have to see how things work out.
http://computer-programming-forum.com/47-c-language/556a90938d01f023.htm
The patch adds missing check for the Intel i82751 MAC being in the super
pass-through mode, which has known deviations in RMCP+ from the IPMI
specification.
ID#313 ipmitool doesn't support hostname long than 64 symbols
ID#277 Minor issue with ipmi_intf_session_set_hostname()
Commit adds support pretty much for FQDN not just up to the length of one label.
This is achieved by change in in struct ipmi_session; and strdup() of user
input. Of course, we have to free() this once we're done.