1760 Commits

Author SHA1 Message Date
Dmitry Bazhenov
718a242205 ID:398 - Fixed channel setaccess command.
'channel setaccess' command uses wrong command-line arguments
to construct the set user access request. This patch fixes
this problem.
2015-11-06 08:52:29 +01:00
Zdenek Styblik
636a785d82 ID:336 - ipmitool does not fall back to IPv4 for IPMI v2 / RMCP+ sessions
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.
2015-11-05 17:31:54 +01:00
Robert Sworder
c38ecd063f ID:374 - Check/set LED Duration correctly 2015-11-04 13:44:52 +01:00
Alexander Rube
b6d0afb0f6 ID:395 - Fix fru string without resizing it
Editing a fru without resizing it caused the checksum being incorrect and not
being updated. This fix changes this, so the checksum is now being correctly
calculated and written to the right place.
2015-10-26 19:03:35 +01:00
Zdenek Styblik
5be090f047 ID:394 - close fp if isn't NULL and set it NULL afterwards in USB plugin
Commit brings back check whether fp is or isn't NULL. If fp isn't NULL, close()
is called and fp is set to NULL afterwards.
2015-10-20 22:03:51 +02:00
Jeremy Kerr
607cfe6f47 ID:394 - plugins/usb: Fix probe for SCSI devices
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>
2015-10-20 21:58:04 +02:00
Pat Donlin
999cd0ad91 ID:393 - ipmitool man page addition for Node Manager support. 2015-10-10 07:26:43 +02:00
Zdenek Styblik
ffeb535db8 ID:392 - _ipmi_get_user_name() work-around for some BMCs
Commit adds a work-around for some BMCs which return ccode 0xCC when user is
disabled. However, this isn't reason to stop listing users as this ccode is
perceived as being "normal".
When 0xCC is returned, empty user name will be printed instead of bailing out.
2015-10-09 20:53:24 +02:00
Zdenek Styblik
4a8691f477 ID:333 - Set read timeout to 15s in OpenIPMI interface
Commit sets read timeout in OpenIPMI interface to 15s in order to eliminate
possible infinite hang.
2015-10-09 20:47:31 +02:00
Zdenek Styblik
c04aa9bb4e ID:388 - Turn all messages into LOG_INFO in VITA discovery
... because people without VITA support don't care about errors related to VITA
discovery. This has been suggested as a part of the ticket and "copied" after
PICMG discovery.
2015-10-04 15:44:09 +02:00
Zdenek Styblik
329281bbce ID:388 - Handle ccode 0xCC as well in VITA discovery 2015-10-04 15:42:32 +02:00
Zdenek Styblik
e2c5b322d8 ID:390 - Support for new Communication Interface (USB Medium)
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.
2015-09-11 19:01:31 +02:00
Zdenek Styblik
13a2a29156 Remove trailing white-spaces in src/plugins/dummy/dummy.c 2015-09-11 06:14:18 +02:00
Alexander Rube
3412d86143 ID:391 - changing data_len from 17 to 16 according to ipmi spec 22.29, first byte is completion code 2015-09-11 06:09:49 +02:00
Zdenek Styblik
a98eedb272 Remove trailing white-spaces in ipmi_user.c 2015-09-11 06:09:25 +02:00
Zdenek Styblik
372b458e0f ID:388 - Fix Error message always printed if BMC does not support VITA
Print error message for 0xC1 to LOG_DEBUG instead of LOG_ERR, because it isn't
an error if VITA isn't supported.
2015-09-11 06:00:44 +02:00
Alexander Rube
0caa68115e ID:389 - Add on of Advantech IANA number 2015-09-02 08:49:35 +02:00
Zdenek Styblik
a5c1120dbb Cleanup trailing white-spaces in ipmi_vita.c 2015-08-26 09:18:35 +02:00
Zdenek Styblik
1add1486f9 ID:355 - Fix couple compiler warnings in ipmi_lanp.h
Commit fixes couple compiler warnings which come from ipmi_lanp.h by setting
values of struct attrs.
2015-08-07 21:50:43 +02:00
Dmitry Bazhenov
89e9e63443 ID:376 - Add means to configure "Bad Password Threshold"
Add support for setting and printing of the "Bad Password Threshold"
LAN configuration parameter.
2015-08-06 07:28:54 +02:00
Zdenek Styblik
30becb3588 ID:384 - Fix compilation under cygwin64
Patch fixes several compile-time errors which appear during IPMITOOL
compilation in Cygwin64 environment.

Commit for: Dmitry Bazhenov
2015-08-01 10:08:20 +02:00
Zdenek Styblik
0d8f9a7453 ID:383 - Fix compile-time error in src/plugins/lan/lan.c
Patch fixes an error of incompatible pointer type which appears during LAN
plugin compilation.

Commit for: Dmitry Bazhenov
2015-08-01 10:05:48 +02:00
Zdenek Styblik
ff80a188f3 ID:382 - Fix memcpy() params in HpmFwupgActionUploadFirmware()
The 'bufLength' variable holds a constant chunk size. If the actual
data length is less than the 'bufLength', then it crashes IPMITool. The
code was already there to calculate the remaining data length, but was
not used in memcpy(). We changed it to use the 'count' variable which
holds the proper available data length.

Commit for: Viswanathan Swaminathan
2015-07-27 06:37:37 +02:00
Zdenek Styblik
169d9ac3fc Merge /u/whissi/ipmitool/ branch fix-pidfile-handling into master
http://sourceforge.net/p/ipmitool/source/merge-requests/8/
2015-07-25 11:38:09 +00:00
Zdenek Styblik
6dec83ff5d ID:369 - Fix lanplus interface bridging and response matching
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
2015-07-25 13:15:41 +02:00
Zdenek Styblik
c87aa0b96a ID:368 - Fix handling of bridging-related parameters
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
2015-07-25 13:03:37 +02:00
Zdenek Styblik
fb6e311d27 ID:367 - Fix building of non-bridged LAN interface commands
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
2015-07-25 12:53:16 +02:00
Zdenek Styblik
24fd406506 ID:366 - Properly clean LAN and LAN+ interfaces on close
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
2015-07-25 12:51:10 +02:00
Zdenek Styblik
a585af7e0c ID:365 - Fix for ipmitool crash when using serial-terminal interface
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
2015-07-25 12:49:07 +02:00
Zdenek Styblik
e8450850e3 ID:364 - Fix for serial-basic interface bridging
Response matching for bridged serial-basic interface request is broken.
This patch fixes the problem.

Commit for: Dmitry Bazhenov
2015-07-25 12:47:20 +02:00
Zdenek Styblik
2d79e69f5f Merge commit '2f5789750183d4ef8be125b8cb32019441dd0530'
Return codes of functions should be either used or evaluated - always. This
merge is necessary for shell scripting to, eg. signal there was an error during
execution.
2015-07-25 10:16:38 +02:00
Pat Donlin
259500e127 ID: 380 raw commands override retry and timeout values
Remove the hard coded override for retry and timeout in ipmi_master_write_read
2015-07-25 09:43:57 +02:00
Pat Donlin
70099a3c40 ID: 380 - raw commands override retry and timeout values
Correct compiler warnings in ipmi_raw.c
2015-07-25 09:43:51 +02:00
Charles Rose
82f6175dc7 ID:381 - Script to log installation status as SEL events
This script helps with logging OS install status to BMC as SEL
events.

Signed-off-by: Charles Rose <charles_rose@dell.com>
2015-07-25 09:42:55 +02:00
Thomas D
d12b3b4870 Output pidfile only in verbose mode 2015-03-27 01:26:46 +01:00
Thomas D
ace0e646a1 Don't output pidfile before parsing command line arguments 2015-03-27 01:16:25 +01:00
Zdenek Styblik
eb54136775 ID:319 - Interface safe re-open
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
2015-03-11 19:41:34 +01:00
Parthasarathy Bhuvaragan
9caa78be38 ID:371 - add ericsson oem
Change-Id: I4fa230b2388e83ae0bc560539675d4dd8783a33e
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.xx.bhuvaragan@ericsson.com>
2015-02-17 15:43:03 +01:00
Parthasarathy Bhuvaragan
925a2fe55c ID:370 - add anonymous union support in CFLAGS for older gcc
In older GCC versions when an element in an anonymous unions/structures are
addressed by name, gcc must use -fms-extensions.

Change-Id: Id80617ad9336c7a02fbe613b58e3f337fa4baeee
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.xx.bhuvaragan@ericsson.com>
2015-02-17 15:42:58 +01:00
Zdenek Styblik
531569ec62 ID:373 - Fix compilation of IMB on Windows
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
2015-02-17 15:23:30 +01:00
Pat Donlin
ce861658c0 Node Manager Feature, correct 1268194 missing break. 2015-02-17 14:51:44 +01:00
Zdenek Styblik
f1c6118c72 ID:320 - Add VITA 46.11 support
Commit adds support for VITA 46.11 by Dmitry Bazhenov.
2015-02-05 18:43:49 +01:00
Zdenek Styblik
d5c2e976d4 ID:355 - remove unused variables from ipmi_dcmi.c
I'd swear I've already removed those, hmm.
2015-02-05 18:37:07 +01:00
Pat Donlin
7a854623aa ID:363 - fix Coverity issues in NM implementation
Commit fixes issues pointed out by Coverity.
2015-02-05 18:32:06 +01:00
Pat Donlin
fd5fdc59f2 ID:363 - Node Manager feature patch. 2015-02-05 18:31:07 +01:00
Zdenek Styblik
4725cfd6d9 Hook ipmi_set_alert_enable() to _ipmi_*()
Commit hooks ipmi_set_alert_enable() to _ipmi_*() functions and is sort of
rewrite of that function with the same functionality.
2015-02-03 11:47:38 +01:00
Zdenek Styblik
5a30d18af2 _ipmi_set_channel_access() - zero-out variable data before use 2015-02-03 11:45:59 +01:00
Zdenek Styblik
11bbf18345 Rewrite ipmi_set_channel_access()
Commit is a rewrite of ipmi_set_channel_access(). Function utilizes _ipmi_*()
functions now in order to avoid code repetition. Other than that, functionality
should remain the same.
2015-02-03 07:42:10 +01:00
Zdenek Styblik
026a8b6fce Add _ipmi_set_channel_access() function
Commit adds _ipmi_set_channel_access() function which in implementation of
(22.22) Set Channel Access Command.
2015-02-03 07:33:08 +01:00
Zdenek Styblik
410606e868 Hook ipmi_set_user_access() to _ipmi_set_user_access()
Commit hooks ipmi_set_user_access() to _ipmi_set_user_access() and removes
duplicate code.
2015-01-30 13:16:44 +01:00