Previously, ipmitool would fail to run if the local copy of the IANA PEN
registry could not be parsed.
When the registry is not available the manufacturer will be "Unknown" but
ipmitool will otherwise function so should not be considered fatal.
Also, fix an issue with improperly handling the `oem_info_list_load`
return value. Previously, in `ipmi_oem_info_init`, if `oem_info_list_load`
returned a negative value due to the registry file not existing, an
improper count would cause `oem_info_init_from_list` to aallocate a list
that didn't encompass the full header/tail list.
IANA PEN registry open failed: No such file or directory
Allocating 3 entries
[ 1] 16777214 | A Debug Assisting Company, Ltd.
[ 0] 1048575 | Unspecified
Now, use a signed int and ensure a valid count of loaded OEMs is used.
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
Add 'soft reset' and 'power-up by RTC wakeup' causes
from IPMI 2.0 spec.
Resolvesipmitool/ipmitool#329
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
- Initialize the log at the start of ipmi_main() to allow for proper
logging at the start;
- Remove the unused log_level_get() function;
- Update log_level_set() to take verbosity instead of log level
(default verbosity is 0, which is LOG_NOTICE log level),
use the function to update log level as `-v` is encountered
in command line;
- Move IANA PEN list debugging to verbosity 6. The list is too long
to see it in each debug output of verbosity 5 that is used for
debugging lan/lanplus packets;
- For verbosity >= 2 (that is `-vv`) add the ipmitool version
information at the start.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Reduce code duplication by extracting option names, types,
and value ranges into a separate structure, and rewriting
the option parsing code without mixing it with the data.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
ftp://ftp.supermicro.com/utility/IPMICFG/IPMICFG_1.30.0_build.190710.zip
contains MBType.dat file that lists all known Supermicro product IDs
with their respective names.
Import that knowledge into ipmitool.
Resolvesipmitool/ipmitool#151
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Add support for IANADIR and IANAUSERDIR variables to configure
to allow for customizable locations of system and user-supplied
IANA PEN registry.
Also make path building code portable to Windows.
Partially resolvesipmitool/ipmitool#11
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Previously, the OEM names dictionary was compiled in and
updating it required rebuilding of `ipmitool`, thus taking a
long time for newly registered OEMs to get supported by the tool.
Building also required a direct internet connection to succeed.
With this commit, the OEM enterprise dictionary is now loaded from
either ${HOME}/.local/usr/share/misc/enterprise-numbers or from
/usr/share/misc/enterprise-numbers (in that precedence).
Those files can be downloaded from iana.org at
http://www.iana.org/assignments/enterprise-numbers
Partially resolvesipmitool/ipmitool#11
Fixes: 9d41136c9b7c7d392f1a3f3adeb6d7fe3bd3135e
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
A potential future problem has been identified in the manufacturer
ID processing code for `mc info` command. Only 16 of 24 bits were
used. This is fixed now.
Also added support for ID 0x0FFFFF, the 'reserved' value as per
IPMI specification. It is now reported as 'Unspecified' unlike other
non-listed IDs that are still reported as 'Unknown'.
ID 0xFFFFFE is used for debugging purposes in hope that IANA won't
reach that number of entities any soon. If it will though, then
IANA's assignment will take precedence.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Prior to this commit, ipmitool had hard-coded list
of OEM Vendor IDs that it recognized.
With this commit, the list is fetched directly from
IANA PEN registry at build time, so that each release
will now contain an up-to-date list of vendors.
Only basic ASCII characters are supported now. Any
Unicode or extended ASCII will be either transliterated
(cyrillic and diacritic) or simply removed (chinese).
Closes:
ID:491 https://sourceforge.net/p/ipmitool/bugs/491/
ID:505 https://sourceforge.net/p/ipmitool/bugs/505/
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Commit implements `Enable status` which shows/is in alignment with (22.27) Get
User Access Command and displays User ID Enable/Disable status of given User ID
at given channel.
Commit adds support for cipher suites 6/7/8 (HMAC-MD5) and cipher
suites 15/16/17 (HMAC_SHA256).
This also fixes:
* ID:442 - IPMI_AUTH_RAKP_HMAC_MD5 support in lanplus
* ID:141 - RMCP+ Cipher-suite 17 not supported
Original author Liebig Holger(Fujitsu).
Code cleanup done by Florian Breu and Zdenek Styblik.
Reworked event type code/sensor type parsing in order to support
VITA-specific extensions. Added VITA-specific sensor-specific event
types and VITA-specific sensor types.