mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-11 11:07:23 +00:00
Correct IMPI -> IPMI typos all over the source tree.
Patch submitted by Steffen Persvold (sp at scali dot com).
This commit is contained in:
parent
61318c0158
commit
86364dec74
@ -1486,7 +1486,7 @@ command line option.
|
|||||||
Like the \fIlan\fP interface, the \fIlanplus\fP interface
|
Like the \fIlan\fP interface, the \fIlanplus\fP interface
|
||||||
communicates with the BMC over an Ethernet LAN connection using
|
communicates with the BMC over an Ethernet LAN connection using
|
||||||
UDP under IPv4. The difference is that the \fIlanplus\fP
|
UDP under IPv4. The difference is that the \fIlanplus\fP
|
||||||
interface uses the RMCP+ protocol as described in the IMPI v2.0
|
interface uses the RMCP+ protocol as described in the IPMI v2.0
|
||||||
specification. RMCP+ allows for improved authentication and data
|
specification. RMCP+ allows for improved authentication and data
|
||||||
integrity checks, as well as encryption and the ability to carry
|
integrity checks, as well as encryption and the ability to carry
|
||||||
multiple types of payloads. Generic Serial Over LAN support
|
multiple types of payloads. Generic Serial Over LAN support
|
||||||
|
@ -38,9 +38,9 @@
|
|||||||
* COMMANDS
|
* COMMANDS
|
||||||
*/
|
*/
|
||||||
#define IPMI_GET_SDR_REPOSITORY_INFO 0x20
|
#define IPMI_GET_SDR_REPOSITORY_INFO 0x20
|
||||||
#define IMPI_SOL_ACTIVATING 0x20
|
#define IPMI_SOL_ACTIVATING 0x20
|
||||||
#define IMPI_SET_SOL_CONFIG_PARAMETERS 0x21
|
#define IPMI_SET_SOL_CONFIG_PARAMETERS 0x21
|
||||||
#define IMPI_GET_SOL_CONFIG_PARAMETERS 0x22
|
#define IPMI_GET_SOL_CONFIG_PARAMETERS 0x22
|
||||||
#define IPMI_SET_USER_ACCESS 0x43
|
#define IPMI_SET_USER_ACCESS 0x43
|
||||||
#define IPMI_GET_USER_ACCESS 0x44
|
#define IPMI_GET_USER_ACCESS 0x44
|
||||||
#define IPMI_SET_USER_NAME 0x45
|
#define IPMI_SET_USER_NAME 0x45
|
||||||
|
@ -93,7 +93,7 @@ struct ipmi_session {
|
|||||||
socklen_t addrlen;
|
socklen_t addrlen;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This struct holds state data specific to IMPI v2 / RMCP+ sessions
|
* This struct holds state data specific to IPMI v2 / RMCP+ sessions
|
||||||
*/
|
*/
|
||||||
struct {
|
struct {
|
||||||
enum LANPLUS_SESSION_STATE session_state;
|
enum LANPLUS_SESSION_STATE session_state;
|
||||||
|
@ -41,7 +41,7 @@ extern const struct valstr entity_device_type_vals[];
|
|||||||
extern const struct valstr ipmi_netfn_vals[];
|
extern const struct valstr ipmi_netfn_vals[];
|
||||||
extern const struct valstr ipmi_channel_activity_type_vals[];
|
extern const struct valstr ipmi_channel_activity_type_vals[];
|
||||||
extern const struct valstr ipmi_privlvl_vals[];
|
extern const struct valstr ipmi_privlvl_vals[];
|
||||||
extern const struct valstr impi_bit_rate_vals[];
|
extern const struct valstr ipmi_bit_rate_vals[];
|
||||||
extern const struct valstr ipmi_set_in_progress_vals[];
|
extern const struct valstr ipmi_set_in_progress_vals[];
|
||||||
extern const struct valstr ipmi_authtype_session_vals[];
|
extern const struct valstr ipmi_authtype_session_vals[];
|
||||||
extern const struct valstr ipmi_authtype_vals[];
|
extern const struct valstr ipmi_authtype_vals[];
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The GET USER ACCESS response from table 22-32 of the IMPI v2.0 spec
|
* The GET USER ACCESS response from table 22-32 of the IPMI v2.0 spec
|
||||||
*/
|
*/
|
||||||
struct user_access_rsp {
|
struct user_access_rsp {
|
||||||
#if WORDS_BIGENDIAN
|
#if WORDS_BIGENDIAN
|
||||||
|
@ -156,7 +156,7 @@ ipmi_get_sol_info(
|
|||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
memset(&req, 0, sizeof(req));
|
||||||
req.msg.netfn = IPMI_NETFN_TRANSPORT;
|
req.msg.netfn = IPMI_NETFN_TRANSPORT;
|
||||||
req.msg.cmd = IMPI_GET_SOL_CONFIG_PARAMETERS;
|
req.msg.cmd = IPMI_GET_SOL_CONFIG_PARAMETERS;
|
||||||
req.msg.data_len = 4;
|
req.msg.data_len = 4;
|
||||||
req.msg.data = data;
|
req.msg.data = data;
|
||||||
|
|
||||||
@ -533,10 +533,10 @@ ipmi_print_sol_info(struct ipmi_intf * intf, uint8_t channel)
|
|||||||
printf("%d,", params.retry_interval * 10);
|
printf("%d,", params.retry_interval * 10);
|
||||||
|
|
||||||
printf("%s,",
|
printf("%s,",
|
||||||
val2str(params.volatile_bit_rate, impi_bit_rate_vals));
|
val2str(params.volatile_bit_rate, ipmi_bit_rate_vals));
|
||||||
|
|
||||||
printf("%s,",
|
printf("%s,",
|
||||||
val2str(params.non_volatile_bit_rate, impi_bit_rate_vals));
|
val2str(params.non_volatile_bit_rate, ipmi_bit_rate_vals));
|
||||||
|
|
||||||
printf("%d,", params.payload_channel);
|
printf("%d,", params.payload_channel);
|
||||||
printf("%d\n", params.payload_port);
|
printf("%d\n", params.payload_port);
|
||||||
@ -564,10 +564,10 @@ ipmi_print_sol_info(struct ipmi_intf * intf, uint8_t channel)
|
|||||||
params.retry_interval * 10);
|
params.retry_interval * 10);
|
||||||
|
|
||||||
printf("Volatile Bit Rate (kbps) : %s\n",
|
printf("Volatile Bit Rate (kbps) : %s\n",
|
||||||
val2str(params.volatile_bit_rate, impi_bit_rate_vals));
|
val2str(params.volatile_bit_rate, ipmi_bit_rate_vals));
|
||||||
|
|
||||||
printf("Non-Volatile Bit Rate (kbps) : %s\n",
|
printf("Non-Volatile Bit Rate (kbps) : %s\n",
|
||||||
val2str(params.non_volatile_bit_rate, impi_bit_rate_vals));
|
val2str(params.non_volatile_bit_rate, ipmi_bit_rate_vals));
|
||||||
|
|
||||||
printf("Payload Channel : %d (0x%02x)\n",
|
printf("Payload Channel : %d (0x%02x)\n",
|
||||||
params.payload_channel, params.payload_channel);
|
params.payload_channel, params.payload_channel);
|
||||||
@ -603,7 +603,7 @@ ipmi_sol_set_param(struct ipmi_intf * intf,
|
|||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
memset(&req, 0, sizeof(req));
|
||||||
req.msg.netfn = IPMI_NETFN_TRANSPORT; /* 0x0c */
|
req.msg.netfn = IPMI_NETFN_TRANSPORT; /* 0x0c */
|
||||||
req.msg.cmd = IMPI_SET_SOL_CONFIG_PARAMETERS; /* 0x21 */
|
req.msg.cmd = IPMI_SET_SOL_CONFIG_PARAMETERS; /* 0x21 */
|
||||||
req.msg.data = data;
|
req.msg.data = data;
|
||||||
|
|
||||||
data[0] = channel;
|
data[0] = channel;
|
||||||
@ -1180,7 +1180,7 @@ output(struct ipmi_rs * rsp)
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* impi_sol_deactivate
|
* ipmi_sol_deactivate
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ipmi_sol_deactivate(struct ipmi_intf * intf)
|
ipmi_sol_deactivate(struct ipmi_intf * intf)
|
||||||
@ -1564,7 +1564,7 @@ ipmi_sol_red_pill(struct ipmi_intf * intf)
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* impi_sol_activate
|
* ipmi_sol_activate
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ipmi_sol_activate(struct ipmi_intf * intf, int looptest, int interval)
|
ipmi_sol_activate(struct ipmi_intf * intf, int looptest, int interval)
|
||||||
|
@ -81,7 +81,7 @@ const struct valstr ipmi_netfn_vals[] = {
|
|||||||
/*
|
/*
|
||||||
* From table 26-4 of the IPMI v2 specification
|
* From table 26-4 of the IPMI v2 specification
|
||||||
*/
|
*/
|
||||||
const struct valstr impi_bit_rate_vals[] = {
|
const struct valstr ipmi_bit_rate_vals[] = {
|
||||||
{ 0x00, "IPMI-Over-Serial-Setting"}, /* Using the value in the IPMI Over Serial Config */
|
{ 0x00, "IPMI-Over-Serial-Setting"}, /* Using the value in the IPMI Over Serial Config */
|
||||||
{ 0x06, "9.6" },
|
{ 0x06, "9.6" },
|
||||||
{ 0x07, "19.2" },
|
{ 0x07, "19.2" },
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
This document was last updated for release 1.8.8.
|
This document was last updated for release 1.8.8.
|
||||||
|
|
||||||
This document explains how Serial Over Lan is implemented on in the
|
This document explains how Serial Over Lan is implemented on in the
|
||||||
impitool IPMI client. Obviously, the code itself is authoritative, but
|
ipmitool IPMI client. Obviously, the code itself is authoritative, but
|
||||||
this document should serve as a good starting point.
|
this document should serve as a good starting point.
|
||||||
|
|
||||||
Serial Over Lan (SOL) is defined in the IPMI v2 specification published by
|
Serial Over Lan (SOL) is defined in the IPMI v2 specification published by
|
||||||
@ -15,10 +15,10 @@ command maps directly to the IPMI Activate Payload command. It first
|
|||||||
verifies that an RMCP+ session (lanplus interface) is being used to
|
verifies that an RMCP+ session (lanplus interface) is being used to
|
||||||
establish the session. Although the spec allows for a SOL connection to be
|
establish the session. Although the spec allows for a SOL connection to be
|
||||||
established on a port different than the RMCP+ port that the "activate
|
established on a port different than the RMCP+ port that the "activate
|
||||||
payload" command issued, impitool does not support this.
|
payload" command issued, ipmitool does not support this.
|
||||||
|
|
||||||
Once a session has been established (the activate payload command
|
Once a session has been established (the activate payload command
|
||||||
succeeds), impitool simply loops over a select() on user input and data
|
succeeds), ipmitool simply loops over a select() on user input and data
|
||||||
returned from the BMC. All user input is first filtered so that special
|
returned from the BMC. All user input is first filtered so that special
|
||||||
escape sequences can suspend or deactivate the SOL session and so that data
|
escape sequences can suspend or deactivate the SOL session and so that data
|
||||||
can be broken into chunks no greater than N bytes. This maximum is
|
can be broken into chunks no greater than N bytes. This maximum is
|
||||||
@ -36,7 +36,7 @@ honored by ipmitool.
|
|||||||
Note that one way that SOL communication differs from standard IPMI
|
Note that one way that SOL communication differs from standard IPMI
|
||||||
commands, is that it is not simply a request response protocol. Packets
|
commands, is that it is not simply a request response protocol. Packets
|
||||||
may be returned asyncrhonously from the BMC. When establishing a SOL
|
may be returned asyncrhonously from the BMC. When establishing a SOL
|
||||||
session, impitool registers a callback for asynchonously received data.
|
session, ipmitool registers a callback for asynchonously received data.
|
||||||
This call back simply prints text returned from the BMC.
|
This call back simply prints text returned from the BMC.
|
||||||
|
|
||||||
Once a user has chosen to exit the SOL session (with ~.) ipmitool sends the
|
Once a user has chosen to exit the SOL session (with ~.) ipmitool sends the
|
||||||
|
@ -862,7 +862,7 @@ ipmi_lan_poll_recv(struct ipmi_intf * intf)
|
|||||||
/*
|
/*
|
||||||
* read_open_session_reponse
|
* read_open_session_reponse
|
||||||
*
|
*
|
||||||
* Initialize the ipmi_rs from the IMPI 2.x open session response data.
|
* Initialize the ipmi_rs from the IPMI 2.x open session response data.
|
||||||
*
|
*
|
||||||
* The offset should point to the first byte of the the Open Session Response
|
* The offset should point to the first byte of the the Open Session Response
|
||||||
* payload when this function is called.
|
* payload when this function is called.
|
||||||
@ -924,7 +924,7 @@ read_open_session_response(struct ipmi_rs * rsp, int offset)
|
|||||||
/*
|
/*
|
||||||
* read_rakp2_message
|
* read_rakp2_message
|
||||||
*
|
*
|
||||||
* Initialize the ipmi_rs from the IMPI 2.x RAKP 2 message
|
* Initialize the ipmi_rs from the IPMI 2.x RAKP 2 message
|
||||||
*
|
*
|
||||||
* The offset should point the first byte of the the RAKP 2 payload when this
|
* The offset should point the first byte of the the RAKP 2 payload when this
|
||||||
* function is called.
|
* function is called.
|
||||||
@ -1004,7 +1004,7 @@ read_rakp2_message(
|
|||||||
/*
|
/*
|
||||||
* read_rakp4_message
|
* read_rakp4_message
|
||||||
*
|
*
|
||||||
* Initialize the ipmi_rs from the IMPI 2.x RAKP 4 message
|
* Initialize the ipmi_rs from the IPMI 2.x RAKP 4 message
|
||||||
*
|
*
|
||||||
* The offset should point the first byte of the the RAKP 4 payload when this
|
* The offset should point the first byte of the the RAKP 4 payload when this
|
||||||
* function is called.
|
* function is called.
|
||||||
@ -1212,7 +1212,7 @@ void read_session_data_v15(
|
|||||||
/*
|
/*
|
||||||
* read_ipmi_response
|
* read_ipmi_response
|
||||||
*
|
*
|
||||||
* Initialize the impi_rs from with the IPMI response specific data
|
* Initialize the ipmi_rs from with the IPMI response specific data
|
||||||
*
|
*
|
||||||
* The offset should point the first byte of the the IPMI payload when this
|
* The offset should point the first byte of the the IPMI payload when this
|
||||||
* function is called.
|
* function is called.
|
||||||
@ -1244,7 +1244,7 @@ void read_ipmi_response(struct ipmi_rs * rsp, int * offset)
|
|||||||
/*
|
/*
|
||||||
* read_sol_packet
|
* read_sol_packet
|
||||||
*
|
*
|
||||||
* Initialize the impi_rs with the SOL response data
|
* Initialize the ipmi_rs with the SOL response data
|
||||||
*
|
*
|
||||||
* The offset should point the first byte of the the SOL payload when this
|
* The offset should point the first byte of the the SOL payload when this
|
||||||
* function is called.
|
* function is called.
|
||||||
@ -1598,32 +1598,32 @@ ipmi_lanplus_build_v2x_msg(
|
|||||||
*------------------------------------------
|
*------------------------------------------
|
||||||
*/
|
*/
|
||||||
/* ipmi session Auth Type / Format is always 0x06 for IPMI v2 */
|
/* ipmi session Auth Type / Format is always 0x06 for IPMI v2 */
|
||||||
msg[IMPI_LANPLUS_OFFSET_AUTHTYPE] = 0x06;
|
msg[IPMI_LANPLUS_OFFSET_AUTHTYPE] = 0x06;
|
||||||
|
|
||||||
/* Payload Type -- also specifies whether were authenticated/encyrpted */
|
/* Payload Type -- also specifies whether were authenticated/encyrpted */
|
||||||
msg[IMPI_LANPLUS_OFFSET_PAYLOAD_TYPE] = payload->payload_type;
|
msg[IPMI_LANPLUS_OFFSET_PAYLOAD_TYPE] = payload->payload_type;
|
||||||
|
|
||||||
if (session->v2_data.session_state == LANPLUS_STATE_ACTIVE)
|
if (session->v2_data.session_state == LANPLUS_STATE_ACTIVE)
|
||||||
{
|
{
|
||||||
msg[IMPI_LANPLUS_OFFSET_PAYLOAD_TYPE] |=
|
msg[IPMI_LANPLUS_OFFSET_PAYLOAD_TYPE] |=
|
||||||
((session->v2_data.crypt_alg != IPMI_CRYPT_NONE )? 0x80 : 0x00);
|
((session->v2_data.crypt_alg != IPMI_CRYPT_NONE )? 0x80 : 0x00);
|
||||||
msg[IMPI_LANPLUS_OFFSET_PAYLOAD_TYPE] |=
|
msg[IPMI_LANPLUS_OFFSET_PAYLOAD_TYPE] |=
|
||||||
((session->v2_data.integrity_alg != IPMI_INTEGRITY_NONE)? 0x40 : 0x00);
|
((session->v2_data.integrity_alg != IPMI_INTEGRITY_NONE)? 0x40 : 0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (session->v2_data.session_state == LANPLUS_STATE_ACTIVE)
|
if (session->v2_data.session_state == LANPLUS_STATE_ACTIVE)
|
||||||
{
|
{
|
||||||
/* Session ID -- making it LSB */
|
/* Session ID -- making it LSB */
|
||||||
msg[IMPI_LANPLUS_OFFSET_SESSION_ID ] = session->v2_data.bmc_id & 0xff;
|
msg[IPMI_LANPLUS_OFFSET_SESSION_ID ] = session->v2_data.bmc_id & 0xff;
|
||||||
msg[IMPI_LANPLUS_OFFSET_SESSION_ID + 1] = (session->v2_data.bmc_id >> 8) & 0xff;
|
msg[IPMI_LANPLUS_OFFSET_SESSION_ID + 1] = (session->v2_data.bmc_id >> 8) & 0xff;
|
||||||
msg[IMPI_LANPLUS_OFFSET_SESSION_ID + 2] = (session->v2_data.bmc_id >> 16) & 0xff;
|
msg[IPMI_LANPLUS_OFFSET_SESSION_ID + 2] = (session->v2_data.bmc_id >> 16) & 0xff;
|
||||||
msg[IMPI_LANPLUS_OFFSET_SESSION_ID + 3] = (session->v2_data.bmc_id >> 24) & 0xff;
|
msg[IPMI_LANPLUS_OFFSET_SESSION_ID + 3] = (session->v2_data.bmc_id >> 24) & 0xff;
|
||||||
|
|
||||||
/* Sequence Number -- making it LSB */
|
/* Sequence Number -- making it LSB */
|
||||||
msg[IMPI_LANPLUS_OFFSET_SEQUENCE_NUM ] = session->out_seq & 0xff;
|
msg[IPMI_LANPLUS_OFFSET_SEQUENCE_NUM ] = session->out_seq & 0xff;
|
||||||
msg[IMPI_LANPLUS_OFFSET_SEQUENCE_NUM + 1] = (session->out_seq >> 8) & 0xff;
|
msg[IPMI_LANPLUS_OFFSET_SEQUENCE_NUM + 1] = (session->out_seq >> 8) & 0xff;
|
||||||
msg[IMPI_LANPLUS_OFFSET_SEQUENCE_NUM + 2] = (session->out_seq >> 16) & 0xff;
|
msg[IPMI_LANPLUS_OFFSET_SEQUENCE_NUM + 2] = (session->out_seq >> 16) & 0xff;
|
||||||
msg[IMPI_LANPLUS_OFFSET_SEQUENCE_NUM + 3] = (session->out_seq >> 24) & 0xff;
|
msg[IPMI_LANPLUS_OFFSET_SEQUENCE_NUM + 3] = (session->out_seq >> 24) & 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1715,9 +1715,9 @@ ipmi_lanplus_build_v2x_msg(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Now we know the payload length */
|
/* Now we know the payload length */
|
||||||
msg[IMPI_LANPLUS_OFFSET_PAYLOAD_SIZE ] =
|
msg[IPMI_LANPLUS_OFFSET_PAYLOAD_SIZE ] =
|
||||||
payload->payload_length & 0xff;
|
payload->payload_length & 0xff;
|
||||||
msg[IMPI_LANPLUS_OFFSET_PAYLOAD_SIZE + 1] =
|
msg[IPMI_LANPLUS_OFFSET_PAYLOAD_SIZE + 1] =
|
||||||
(payload->payload_length >> 8) & 0xff;
|
(payload->payload_length >> 8) & 0xff;
|
||||||
|
|
||||||
|
|
||||||
@ -1781,14 +1781,14 @@ ipmi_lanplus_build_v2x_msg(
|
|||||||
2;
|
2;
|
||||||
|
|
||||||
if (verbose > 2)
|
if (verbose > 2)
|
||||||
printbuf(msg + IMPI_LANPLUS_OFFSET_AUTHTYPE, hmac_input_size, "authcode input");
|
printbuf(msg + IPMI_LANPLUS_OFFSET_AUTHTYPE, hmac_input_size, "authcode input");
|
||||||
|
|
||||||
|
|
||||||
/* Auth Code */
|
/* Auth Code */
|
||||||
lanplus_HMAC(session->v2_data.integrity_alg,
|
lanplus_HMAC(session->v2_data.integrity_alg,
|
||||||
session->v2_data.k1, /* key */
|
session->v2_data.k1, /* key */
|
||||||
20, /* key length */
|
20, /* key length */
|
||||||
msg + IMPI_LANPLUS_OFFSET_AUTHTYPE, /* hmac input */
|
msg + IPMI_LANPLUS_OFFSET_AUTHTYPE, /* hmac input */
|
||||||
hmac_input_size,
|
hmac_input_size,
|
||||||
hmac_output,
|
hmac_output,
|
||||||
&hmac_length);
|
&hmac_length);
|
||||||
@ -2569,7 +2569,7 @@ ipmi_lanplus_send_ipmi_cmd(
|
|||||||
* ipmi_get_auth_capabilities_cmd
|
* ipmi_get_auth_capabilities_cmd
|
||||||
*
|
*
|
||||||
* This command may have to be sent twice. We first ask for the
|
* This command may have to be sent twice. We first ask for the
|
||||||
* authentication capabilities with the "request IMPI v2 data bit"
|
* authentication capabilities with the "request IPMI v2 data bit"
|
||||||
* set. If this fails, we send the same command without that bit
|
* set. If this fails, we send the same command without that bit
|
||||||
* set.
|
* set.
|
||||||
*
|
*
|
||||||
@ -2642,7 +2642,7 @@ ipmi_get_auth_capabilities_cmd(
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
impi_close_session_cmd(struct ipmi_intf * intf)
|
ipmi_close_session_cmd(struct ipmi_intf * intf)
|
||||||
{
|
{
|
||||||
struct ipmi_rs * rsp;
|
struct ipmi_rs * rsp;
|
||||||
struct ipmi_rq req;
|
struct ipmi_rq req;
|
||||||
@ -2876,7 +2876,7 @@ ipmi_lanplus_open_session(struct ipmi_intf * intf)
|
|||||||
/*
|
/*
|
||||||
* ipmi_lanplus_rakp1
|
* ipmi_lanplus_rakp1
|
||||||
*
|
*
|
||||||
* Build and send the RAKP 1 message as part of the IMPI v2 / RMCP+ session
|
* Build and send the RAKP 1 message as part of the IPMI v2 / RMCP+ session
|
||||||
* negotiation protocol. We also read and validate the RAKP 2 message received
|
* negotiation protocol. We also read and validate the RAKP 2 message received
|
||||||
* from the BMC, here. See section 13.20 of the IPMI v2 specification for
|
* from the BMC, here. See section 13.20 of the IPMI v2 specification for
|
||||||
* details.
|
* details.
|
||||||
@ -3029,7 +3029,7 @@ ipmi_lanplus_rakp1(struct ipmi_intf * intf)
|
|||||||
/*
|
/*
|
||||||
* ipmi_lanplus_rakp3
|
* ipmi_lanplus_rakp3
|
||||||
*
|
*
|
||||||
* Build and send the RAKP 3 message as part of the IMPI v2 / RMCP+ session
|
* Build and send the RAKP 3 message as part of the IPMI v2 / RMCP+ session
|
||||||
* negotiation protocol. We also read and validate the RAKP 4 message received
|
* negotiation protocol. We also read and validate the RAKP 4 message received
|
||||||
* from the BMC, here. See section 13.20 of the IPMI v2 specification for
|
* from the BMC, here. See section 13.20 of the IPMI v2 specification for
|
||||||
* details.
|
* details.
|
||||||
@ -3193,7 +3193,7 @@ void
|
|||||||
ipmi_lanplus_close(struct ipmi_intf * intf)
|
ipmi_lanplus_close(struct ipmi_intf * intf)
|
||||||
{
|
{
|
||||||
if (!intf->abort)
|
if (!intf->abort)
|
||||||
impi_close_session_cmd(intf);
|
ipmi_close_session_cmd(intf);
|
||||||
|
|
||||||
if (intf->fd >= 0)
|
if (intf->fd >= 0)
|
||||||
close(intf->fd);
|
close(intf->fd);
|
||||||
|
@ -80,11 +80,11 @@
|
|||||||
|
|
||||||
|
|
||||||
/* Session message offsets, from table 13-8 of the v2 specification */
|
/* Session message offsets, from table 13-8 of the v2 specification */
|
||||||
#define IMPI_LANPLUS_OFFSET_AUTHTYPE 0x04
|
#define IPMI_LANPLUS_OFFSET_AUTHTYPE 0x04
|
||||||
#define IMPI_LANPLUS_OFFSET_PAYLOAD_TYPE 0x05
|
#define IPMI_LANPLUS_OFFSET_PAYLOAD_TYPE 0x05
|
||||||
#define IMPI_LANPLUS_OFFSET_SESSION_ID 0x06
|
#define IPMI_LANPLUS_OFFSET_SESSION_ID 0x06
|
||||||
#define IMPI_LANPLUS_OFFSET_SEQUENCE_NUM 0x0A
|
#define IPMI_LANPLUS_OFFSET_SEQUENCE_NUM 0x0A
|
||||||
#define IMPI_LANPLUS_OFFSET_PAYLOAD_SIZE 0x0E
|
#define IPMI_LANPLUS_OFFSET_PAYLOAD_SIZE 0x0E
|
||||||
#define IPMI_LANPLUS_OFFSET_PAYLOAD 0x10
|
#define IPMI_LANPLUS_OFFSET_PAYLOAD 0x10
|
||||||
|
|
||||||
|
|
||||||
|
@ -793,8 +793,8 @@ int lanplus_has_valid_auth_code(struct ipmi_rs * rs,
|
|||||||
lanplus_HMAC(session->v2_data.integrity_alg,
|
lanplus_HMAC(session->v2_data.integrity_alg,
|
||||||
session->v2_data.k1,
|
session->v2_data.k1,
|
||||||
IPMI_AUTHCODE_BUFFER_SIZE,
|
IPMI_AUTHCODE_BUFFER_SIZE,
|
||||||
rs->data + IMPI_LANPLUS_OFFSET_AUTHTYPE,
|
rs->data + IPMI_LANPLUS_OFFSET_AUTHTYPE,
|
||||||
rs->data_len - IMPI_LANPLUS_OFFSET_AUTHTYPE - IPMI_SHA1_AUTHCODE_SIZE,
|
rs->data_len - IPMI_LANPLUS_OFFSET_AUTHTYPE - IPMI_SHA1_AUTHCODE_SIZE,
|
||||||
generated_authcode,
|
generated_authcode,
|
||||||
&generated_authcode_length);
|
&generated_authcode_length);
|
||||||
|
|
||||||
@ -802,8 +802,8 @@ int lanplus_has_valid_auth_code(struct ipmi_rs * rs,
|
|||||||
{
|
{
|
||||||
lprintf(LOG_DEBUG+2, "Validating authcode");
|
lprintf(LOG_DEBUG+2, "Validating authcode");
|
||||||
printbuf(session->v2_data.k1, 20, "K1");
|
printbuf(session->v2_data.k1, 20, "K1");
|
||||||
printbuf(rs->data + IMPI_LANPLUS_OFFSET_AUTHTYPE,
|
printbuf(rs->data + IPMI_LANPLUS_OFFSET_AUTHTYPE,
|
||||||
rs->data_len - IMPI_LANPLUS_OFFSET_AUTHTYPE - IPMI_SHA1_AUTHCODE_SIZE,
|
rs->data_len - IPMI_LANPLUS_OFFSET_AUTHTYPE - IPMI_SHA1_AUTHCODE_SIZE,
|
||||||
"Authcode Input Data");
|
"Authcode Input Data");
|
||||||
printbuf(generated_authcode, 12, "Generated authcode");
|
printbuf(generated_authcode, 12, "Generated authcode");
|
||||||
printbuf(bmc_authcode, 12, "Expected authcode");
|
printbuf(bmc_authcode, 12, "Expected authcode");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user