2006 Commits

Author SHA1 Message Date
Alexander Amelkin
8c0e76c21a
nm: Fix policy range (#12)
From Node Manager spec 4.0, policy ID is one Byte data and the range is 0-255.
2018-05-30 19:08:26 +03:00
Alexander Amelkin
432f06db3f
Replace user_id masks with a macro (#8)
In multiple places throughout ipmi_user.c a user id mask
was used as a magic number, in some places the mask was wrong.
This commit replaces all those magic numbers with a single
IPMI_UID() macro.

Resolves ipmitool/ipmitool#6
2018-05-30 18:57:20 +03:00
Hnan-Ting Lo
564aef2aff fru: internaluse: Fix segmentation fault (#9)
A segmentation fault was trigged by executing 'ipmitool fru internaluse 1 info'.
A memset() was attempted on the address of a pointer, not on the pointer itself.
The erroneous memset() is removed with this commit because it duplicates
the memset() in line 4072.

Resolves ipmitool/ipmitool#9
Signed-off-by: Kylix Lo <kylix0713@gmail.com>
2018-05-30 18:31:24 +03:00
Thomas Abraham
ef7564a7ac
Re-apply commit 58d510f90feb
Commit 58d510f90feb ("ID : 103 picmg discover messages should
be DEBUG, not INFO") changed picmg discover messages from DEBUG
to INFO. However, commit f1c6118c722b ("ID:320 - Add VITA 46.11
support") reverted this without explanation.

This patch reverts the picmg discover messages back to DEBUG.
2018-05-11 14:24:17 +03:00
Alexander Amelkin
724f7329a3
dcmi: Refactor
- Refactor the ipmi_dcmi code for better readability;
- Get rid of space indents;
- Use tabs for indent, spaces for alignment;
- Wrap too long lines;
2018-04-05 21:08:22 +03:00
Alexander Amelkin
f498e3e296
ID:508 - Refix 6d9c540: Forgotten changes
Some array terminators were left unmodifed.
This commit removes the diversity to make all terminators unified.
2018-04-05 20:11:30 +03:00
Alexander Amelkin
6d9c540f6b
ID:508 - Fix segfaults in dcmi command handlers
Some command lists were not terminated properly.
This commit fixes that.
2018-04-03 19:46:35 +03:00
Alexander Amelkin
60723084e6
vendor: Add YADRO VESNIN identification
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
2018-03-30 12:45:03 +03:00
Alexander Amelkin
9d41136c9b
ID:491 - Fetch vendor IDs from IANA
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>
2018-03-30 02:33:35 +03:00
srinivasa_mareedu
ecb4cfbff8 ID:472 - Fix The Most recent Addition/Erase date
Fix the Most recent Addition/Erase date are not matched between in-band and
out-band.

ipmitool SDR code doesn't have to check for valid date to print
based on 'Delete SDR command supported' and 'Partial Add SDR command
supported', if 0xffffffff is taken. Also 'Timestamp' data type needs to change
to time_t(long) because same data type is using for gmtime(time_t) API, it has
different behaviour for Linux and Windows C.
2017-04-06 21:51:45 +02:00
Holger Liebig
1664902525 ID:480 - Call EVP_CIPHER_CTX_free() instead of EVP_CIPHER_CTX_cleanup()
Call EVP_CIPHER_CTX_free() instead of EVP_CIPHER_CTX_cleanup() to fix memory
leak.
2017-04-04 20:54:22 +02:00
Zdenek Styblik
f004b4b719 ID:480 - ipmitool coredumps in EVP_CIPHER_CTX_init
IPMI tool coredumps due to changes introduced in ID:461. This shouldn't be
surprise as a NULL pointer is passed to init. Commit addresses this issue by
calling EVP_CIPHER_CTX_new() instead of EVP_CIPHER_CTX_init(), which is
deprecated, and by checking return value of call to former function.
2017-03-26 15:15:30 +02:00
Alexander Amelkin
ba01dc84b4 Make git revision more descriptive
The previously introduced mechanism of generating
a git revision was only using the abbreviated hash.
That approach doesn't give a clue whether version
1.8.18.2c99bf6 is newer or older than 1.8.18.7f8d374.

The project uses tags, so `git describe` can be
employed to produce an incremental revision number
since the last tag. Version 1.8.18.13 is much more
understandable and comparable. Howerver that doesn't
answer the question "what codebase was used". To
address that, the abbreviated hash should also be
preserved. Hence, this commit introduces a new
versioning scheme like `1.8.18.13.gee01aa5`.

For git snapshots when git program is absent the
version will be like `1.8.18.0.gsnapshot`.

For cases when .git directory is missing (Release
compilation?) the suffix part will be omitted
completely yielding a version like `1.8.18`.

The suffix generation has been moved to the added
csv-revision script. The script is absolutely
POSIX-ly correct and doesn't require XSI or any
other POSIX extensions.
2017-03-19 18:55:11 +01:00
Alexander Amelkin
497f7767cd ID:477 - fru: Fix decoding of non-text data in get_fru_area_str()
The get_fru_area_str() function is used to decode FRU area
fields into text. Areas may be encoded as text, binary,
BCDplus or 6-bit ASCII. Decoding of 6-bit ASCII and BCDplus
was broken. There was an error in the formulas used to
calculate the resulting string length, plus the decoding
formulas for BCDplus was wrong.

For BCDplus the resulting length was considered equal
the encoded data length, while in fact it's twice as big.
Only one character instead of two was being extracted from
a single input byte while two nibbles must have been taken
into account.

For 6-bit ASCII rounding of 3 to 4 bytes conversion was done
improperly adding 2 to the original length instead of the
result of multiplication.
2017-02-08 11:46:04 +03:00
Alexander Amelkin
7b0302cef5 ID:479 - ekanalyzer: fix processing of custom mfg. fields
Ekanalyzer was not reading the type/length byte for the 2nd and
subsequent custom fields. Also the message it displayed when
lacked data for custom fields was very relaxing and incorrect.
2017-02-08 11:45:59 +03:00
Alexander Amelkin
840f573083 ID:478 - ekanalyzer: Fixed decoding of FRU fields
Got rid of the field decoding code that was only capable of
processing ASCII and binary fields, and switched to using
get_fru_area_str() that can also decode BCDplus and 6-bit ASCII
and maybe will eventually be enabled to decode Unicode text
as well.

This is the first step to completely get rid of the completely
awfully written FRU data decoding functionality of ekanalyzer
that essentially duplicates that of ipmi_fru.c module.
2017-02-02 16:02:57 +03:00
Alexander Amelkin
41fa699ae9 Add some more configure/build/editor byproducts to .gitignore 2017-02-02 15:43:12 +03:00
Alexander Amelkin
b35a634908 Add git hash and dirty mark to ipmitool version
Replace the static 'csv' suffix with a short hash
and a 'dirty' mark (when the tree is modified).

When git is not available, '.git_snapshot' suffix
will be used.
2017-02-02 15:42:36 +03:00
Alexander Amelkin
bc7d23761d Prevent autoreconf from complaining about missing NEWS 2017-01-31 00:22:40 +03:00
Sergey Kleymenov
e45dc6234b Add bootstrap support for Mac 2017-01-31 00:22:40 +03:00
Leonid Nevecherya
5db314f694 ID:474 - Compile fix on nonlinux systems
This patch fixes compilation on systems without a separate <malloc.h>.
2017-01-21 16:50:52 +01:00
Zdenek Styblik
77fe563503 ID:461 - Make compiler happier about changes related to OpenSSL 1.1
Complaint was that ctx isn't initialized.
2017-01-15 15:11:25 +01:00
Zdenek Styblik
7b102293e8 Merge commit 'b57487e360916ab3eaa50aa6d021c73b6337a4a0' 2017-01-15 15:01:38 +01:00
Dennis Schridde
b57487e360 ID:461 - OpenSSL 1.1 compatibility - "error: storage size of 'ctx' isn't known"
In OpenSSL 1.1 EVP_CIPHER_CTX became opaque, cf. `man 3ssl EVP_EncryptInit`

Fixes: ID:461
2016-11-30 17:33:00 +01:00
Bjoern Spruck
80345ac56a Merge branch 'master' of ssh://git.code.sourceforge.net/u/spruckb/ipmitool 2016-11-02 10:33:09 +01:00
Bjoern Spruck
0ea110a247 fix typo 2016-11-02 10:32:36 +01:00
Zdenek Styblik
076ffb5650 Merge /u/spruckb/ipmitool/ branch master into master
https://sourceforge.net/p/ipmitool/source/merge-requests/12/
2016-10-08 08:28:15 +00:00
Zdenek Styblik
b5ce925744 Release Version 1.8.18
Update ChangeLog, configure.ac
IPMITOOL_1_8_18
2016-10-08 10:17:55 +02:00
kcl@supermicro.com.tw
1487681b8c ID:465 - Supermicro memory ecc Modify the memory ecc error display of SEL for new supermicro boards. 2016-10-06 06:14:42 +02:00
Marcin Bernatowicz
75a79e164d ID: 464 - ipmievd crash fix in log_event
added missing format specifier for sensor number in lprintf
2016-09-24 21:16:02 +02:00
Mikko Piironen
2d4762d573 ID:463 - Removal of Nokia Siemens Networks 2016-09-24 20:50:11 +02:00
Bjoern Spruck
2cc196d518 fix typo 2016-09-06 16:31:11 +02:00
Bjoern Spruck
89cffb984b replaced/removed defines which are already present in ipmi_picmg.h
Signed-off-by: Bjoern Spruck <bspruck@uni-mainz.de>
2016-09-01 11:27:38 +02:00
Bjoern Spruck
3f7e82a6b4 added microTCA major version
Signed-off-by: Bjoern Spruck <bspruck@uni-mainz.de>
2016-09-01 11:27:10 +02:00
Bjoern Spruck
c6cd49ea37 fix typo
Signed-off-by: Bjoern Spruck <bspruck@uni-mainz.de>
2016-09-01 11:26:44 +02:00
B BALAJI SINGH
052655cd91 ID:456 - Unable to disable the VLAN ID using ipmitool
Currently, when a LAN parameter set command is sent through ipmitool, the
corresponding parameter data is requested and compared to the command to verify
that the data was written correctly. Since we do send the VLAN ID in this return
data, regardless of whether VLAN is disabled or not, this mismatch between
requested and received parameters causes ipmitool to retry the command 10 times
and return an error.

ipmitool is sending "0x00 0x00" reading back data from BMC as "0x01 0x00" which
is NOT matching & hence pops up the error /warning "LAN Parameter Data does not
match! Write may have failed."
After 10 retries when we check "ipmitool lan print" VLAN ID is disabled
successfully.
2016-08-31 19:34:18 +02:00
Dmitry Rakhchev
fa2c1550b9 ID: 459 - Fix reading FRU on Artesyn (Emerson) shelf manager, MF105.
Treat 0xC7 as an indication that requested data length in the
FRU read shall be decreased.
2016-08-28 10:21:55 +02:00
Zdenek Styblik
51198a1749 ID: 38 - Protocol violating SOL retries when talking to SIMSO-HTC
c&p from the ticket:
~~~
When I try to use CVS-ipmitool on Ubuntu 8.04 x86_64 to talk to a SuperMicros
SIMSO-HTC (Rev. 2.5, IPMI 2.0) chip on a X7SBi-Board via SOL I often get doubled
characters when typing fast, making the SOL interface basically unusable for
anyone accustomed to using a keyboard for longer than a month ;)

At first I thought this was an issue with SuperMicros implementation of the
protocol and/or the flow control
setup on the machine, but their own app works fine (but not the Linux CLI, which
is maybe
based on ipmitool?). But after reading the IPMI 2.0 SOL specs and watching the
debug output for a bit, it seems that is really an issue with lanplus-SOL
protocol implentation of ipmitool in general.

Specifically, in lanplus.c:ipmi_lanplus_send_payload, when waiting for a SOL
response the case that a non SOL packet is returned is not being
checked. Also the "if (is_sol_packet(rsp) && rsp->data_len)" branch does
terminate with a break, but instead goes for a send try, that seems
counterintuitive, Both these things cause doubled characters for me.

The attached patch seems to solve these issues in my case, but I don't claim to
fully understand your protocol code and/or the protocol, so maybe it will cause
problems elsewhere, especially under packet loss conditions.
~~~
2016-08-21 13:16:16 +02:00
Zdenek Styblik
cc9a6b3964 ID:457 - Display User ID enable/disable status
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.
2016-08-21 12:17:10 +02:00
Dan Gora
ea471ed5fa ID:454 - Add support for PICMG 3.1 R2.0 Link Types and Link Classes.
PICMG 3.1 R2.0 introduces new a new Link Class field in the FRU
Link Descriptors which is the upper 4 bits of the Link Type field.
This new Link Class field specifies SERDES lanes with 10.3125Gbd
signalling rate.

It also introduces the new Base-KX and Base-KX4 types which are the
new IEEE replacements for the PICMG 3.0 Base-BX and Base-BX4 types.

This patch decodes these new types and fields and will print out
proper descriptions for each one based on PICMG 3.1 R2.0
2016-08-21 09:48:55 +02:00
Dmitry Rakhchev
e30c357db7 ID:375 - Add lan6 subcommand to handle IPv6 LAN parameters 2016-08-21 08:59:27 +02:00
Zdenek Styblik
95eb252ecd ID:261 - Fix err. output consistency for % ipmitool chassis INV_PARAM; 2016-07-31 20:19:30 +02:00
Zdenek Styblik
2c99bf69ec Fix missing goto out_free; when ipmi_parse_hex() returns (-1) 2016-07-31 08:56:38 +02:00
Dmitry Rakhchev
34711329c2 Add mac2str() and str2mac() to print/parse MAC address 2016-07-31 08:52:40 +02:00
Dmitry Rakhchev
2f76ab3d3a Export find_lan_channel() as global 2016-07-31 08:52:40 +02:00
Dmitry Rakhchev
7f8d37493f Rewrite code with the notion that Kg is binary data, not string
- use uint8_t as the storage type
  - allocate kgkey on stack
  - do not treat incoming kgkey as 0-trminated string in
    ipmi_intf_session_set_kgkey()
2016-07-31 08:52:40 +02:00
Dmitry Rakhchev
f9211f8ed9 Moved ipmi_parse_hex() to helper.c 2016-07-31 08:52:40 +02:00
Dmitry Rakhchev
ea46724878 Fix warning for buf2str argument 2016-07-31 08:52:40 +02:00
Dmitry Rakhchev
9a6ba64651 Extend buf2str to allow separator 2016-07-31 08:52:40 +02:00
Bjoern Spruck
f8a711b9e8 ID:452 - Add PICMG extension 5.x for PICMG extension check
PICMG extension 5(UTCA, MicroTCA) is not detected as valid extension.
The following patch fixes that at one place. In the second place the board type
is detected in a similar way, but it isn't clear if a patch is needed there, too.
2016-07-31 07:29:49 +02:00