|
From: Zdenek S. <st...@us...> - 2015-11-06 08:34:02
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "ipmitool".
The branch, master has been updated
via 37307c93e956e5d0fbc17ee3cc15c69204c3f0bf (commit)
via c9e3e6a01b0abe1557d17ca90406b983184eb704 (commit)
via 603c14274ae6f8cd0bda93ff11795b347033ec74 (commit)
via 14368335b21734ed241ddc3a2429381a56e7d19b (commit)
via c56b5c966760c102c5bf16f77a6555147d4ce2dc (commit)
via 718a242205b30571663fcead7d7089b8ba02aeae (commit)
via 636a785d82e3b0f49e4138b632b48cb5e0a476f8 (commit)
from c38ecd063f644fed49fe470a6006b0670b49f4fb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 37307c93e956e5d0fbc17ee3cc15c69204c3f0bf
Author: Dmitry Bazhenov <di...@pi...>
Date: Wed Nov 4 11:24:21 2015 +0500
ID:401 - Fixed 30 second delay when activating SOL on 'dumb' Intel MACs.
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.
diff --git a/lib/ipmi_main.c b/lib/ipmi_main.c
index 1f019ad..a752b59 100644
--- a/lib/ipmi_main.c
+++ b/lib/ipmi_main.c
@@ -952,20 +952,23 @@ ipmi_main(int argc, char ** argv,
goto out_free;
}
}
- /*
- * Attempt picmg/vita discovery of the actual interface address unless
- * the users specified an address.
- * Address specification always overrides discovery
- */
- if (picmg_discover(ipmi_main_intf)) {
- ipmi_main_intf->picmg_avail = 1;
- } else if (vita_discover(ipmi_main_intf)) {
- ipmi_main_intf->vita_avail = 1;
+
+ if (!ipmi_oem_active(ipmi_main_intf, "i82571spt")) {
+ /*
+ * Attempt picmg/vita discovery of the actual interface
+ * address, unless the users specified an address.
+ * Address specification always overrides discovery
+ */
+ if (picmg_discover(ipmi_main_intf)) {
+ ipmi_main_intf->picmg_avail = 1;
+ } else if (vita_discover(ipmi_main_intf)) {
+ ipmi_main_intf->vita_avail = 1;
+ }
}
if (arg_addr) {
addr = arg_addr;
- } else {
+ } else if (!ipmi_oem_active(ipmi_main_intf, "i82571spt")) {
lprintf(LOG_DEBUG, "Acquire IPMB address");
addr = ipmi_acquire_ipmb_address(ipmi_main_intf);
lprintf(LOG_INFO, "Discovered IPMB address 0x%x", addr);
diff --git a/src/plugins/lanplus/lanplus.c b/src/plugins/lanplus/lanplus.c
index 490d3f5..8776212 100644
--- a/src/plugins/lanplus/lanplus.c
+++ b/src/plugins/lanplus/lanplus.c
@@ -3471,13 +3471,17 @@ ipmi_lanplus_open(struct ipmi_intf * intf)
if (rc < 0) {
goto fail;
}
- }
- intf->manufacturer_id = ipmi_get_oem(intf);
- /* automatically detect interface request and response sizes */
- hpm2_detect_max_payload_size(intf);
+ /* automatically detect interface request and response sizes */
+ hpm2_detect_max_payload_size(intf);
+ }
bridgePossible = 1;
+
+ if (!ipmi_oem_active(intf, "i82571spt")) {
+ intf->manufacturer_id = ipmi_get_oem(intf);
+ }
+
return intf->fd;
fail:
commit c9e3e6a01b0abe1557d17ca90406b983184eb704
Author: Dmitry Bazhenov <di...@pi...>
Date: Mon Oct 26 15:29:46 2015 +0500
ID:397 - Fixed picmg policy set command.
'picmg policy set' command uses too restrictive input values check
which allow setting/clearing only the Activation Locked Bit (#0).
This patch fixes the check to allow setting/clearing Deactivation
Locked Bit (#1) as well.
diff --git a/lib/ipmi_picmg.c b/lib/ipmi_picmg.c
index e2103b5..f47577e 100644
--- a/lib/ipmi_picmg.c
+++ b/lib/ipmi_picmg.c
@@ -751,21 +751,19 @@ ipmi_picmg_fru_activation_policy_set(struct ipmi_intf * intf, int argc, char **
if (is_fru_id(argv[0], &msg_data[1]) != 0) {
return (-1);
}
- if (str2uchar(argv[1], &msg_data[2]) != 0 || msg_data[2] > 1) {
+ if (str2uchar(argv[1], &msg_data[2]) != 0 || msg_data[2] > 3) {
/* FRU Lock Mask */
lprintf(LOG_ERR, "Given FRU Lock Mask '%s' is invalid.",
argv[1]);
return (-1);
}
- if (str2uchar(argv[2], &msg_data[3]) != 0 || msg_data[3] > 1) {
+ if (str2uchar(argv[2], &msg_data[3]) != 0 || msg_data[3] > 3) {
/* FRU Act Policy */
lprintf(LOG_ERR,
"Given FRU Activation Policy '%s' is invalid.",
argv[2]);
return (-1);
}
- msg_data[2]&= 0x03;
- msg_data[3]&= 0x03;
rsp = intf->sendrecv(intf, &req);
commit 603c14274ae6f8cd0bda93ff11795b347033ec74
Author: Dmitry Bazhenov <di...@pi...>
Date: Fri Oct 30 17:33:18 2015 +0500
ID:396 - Fixed invalid length check in picmg led cap command.
'picmg led cap' command expects FRU LED Capabilities response
length 5 bytes minimum (excluding the completion code byte),
while it is only 4 bytes long. This patch makes the command
expect 4 bytes instead.
diff --git a/lib/ipmi_vita.c b/lib/ipmi_vita.c
index 45ddd3e..3900974 100644
--- a/lib/ipmi_vita.c
+++ b/lib/ipmi_vita.c
@@ -592,7 +592,7 @@ ipmi_vita_get_led_color_capabilities(struct ipmi_intf *intf, char **argv)
lprintf(LOG_ERR, "Invalid completion code received: %s",
val2str(rsp->ccode, completion_code_vals));
return -1;
- } else if (rsp->data_len < 5) {
+ } else if (rsp->data_len < 4) {
lprintf(LOG_ERR, "Invalid response length %d", rsp->data_len);
return -1;
} else if (rsp->data[0] != GROUP_EXT_VITA) {
commit 14368335b21734ed241ddc3a2429381a56e7d19b
Author: Dmitry Bazhenov <di...@pi...>
Date: Mon Oct 12 12:57:10 2015 +0500
ID:402 - Misguiding error print-out when using some 'lan' commands.
Redundant call for find_lan_channel() for several 'lan' commands
produces misguiding error output. Those commands require expicit
specification of the channel number and calling to find_lan_channel()
for them is useless. For the rest 'lan' commands which allow
ommiting of the channels number, the find_lan_channel() is called
additionally.
diff --git a/lib/ipmi_lanp.c b/lib/ipmi_lanp.c
index bb619eb..ecd313a 100644
--- a/lib/ipmi_lanp.c
+++ b/lib/ipmi_lanp.c
@@ -2451,8 +2451,6 @@ ipmi_lanp_main(struct ipmi_intf * intf, int argc, char ** argv)
return 0;
}
- chan = find_lan_channel(intf, 1);
-
if (strncmp(argv[0], "printconf", 9) == 0 ||
strncmp(argv[0], "print", 5) == 0)
{
commit c56b5c966760c102c5bf16f77a6555147d4ce2dc
Author: Dmitry Bazhenov <di...@pi...>
Date: Mon Oct 12 12:56:26 2015 +0500
ID:399 - Fixed channel getciphers command.
'channel getciphers' command uses wrong command-line argument
when parsing the target channel number. This patch fixes
this problem.
diff --git a/lib/ipmi_channel.c b/lib/ipmi_channel.c
index 96361eb..5171644 100644
--- a/lib/ipmi_channel.c
+++ b/lib/ipmi_channel.c
@@ -882,7 +882,7 @@ ipmi_channel_main(struct ipmi_intf *intf, int argc, char **argv)
return (-1);
}
if (argc == 3) {
- if (is_ipmi_channel_num(argv[1], &channel) != 0) {
+ if (is_ipmi_channel_num(argv[2], &channel) != 0) {
return (-1);
}
}
commit 718a242205b30571663fcead7d7089b8ba02aeae
Author: Dmitry Bazhenov <di...@pi...>
Date: Mon Oct 12 12:50:14 2015 +0500
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.
diff --git a/lib/ipmi_channel.c b/lib/ipmi_channel.c
index 95017b8..96361eb 100644
--- a/lib/ipmi_channel.c
+++ b/lib/ipmi_channel.c
@@ -776,7 +776,7 @@ ipmi_set_user_access(struct ipmi_intf *intf, int argc, char **argv)
channel, user_id);
return (-1);
}
- for (i = 3; i < argc; i ++) {
+ for (i = 2; i < argc; i ++) {
if (strncmp(argv[i], "callin=", 7) == 0) {
if (strncmp(argv[i] + 7, "off", 3) == 0) {
user_access.callin_callback = 1;
commit 636a785d82e3b0f49e4138b632b48cb5e0a476f8
Author: Zdenek Styblik <st...@tu...>
Date: Thu Nov 5 17:31:54 2015 +0100
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.
diff --git a/include/ipmitool/ipmi_intf.h b/include/ipmitool/ipmi_intf.h
index efec82d..67f6019 100644
--- a/include/ipmitool/ipmi_intf.h
+++ b/include/ipmitool/ipmi_intf.h
@@ -176,6 +176,7 @@ struct ipmi_intf {
int picmg_avail;
int vita_avail;
IPMI_OEM manufacturer_id;
+ int ai_family;
struct ipmi_session_params ssn_params;
struct ipmi_session * session;
diff --git a/lib/ipmi_main.c b/lib/ipmi_main.c
index cfb05f7..1f019ad 100644
--- a/lib/ipmi_main.c
+++ b/lib/ipmi_main.c
@@ -75,9 +75,9 @@
#endif
#ifdef ENABLE_ALL_OPTIONS
-# define OPTION_STRING "I:hVvcgsEKYao:H:d:P:f:U:p:C:L:A:t:T:m:z:S:l:b:B:e:k:y:O:R:N:D:"
+# define OPTION_STRING "I:46hVvcgsEKYao:H:d:P:f:U:p:C:L:A:t:T:m:z:S:l:b:B:e:k:y:O:R:N:D:"
#else
-# define OPTION_STRING "I:hVvcH:f:U:p:d:S:D:"
+# define OPTION_STRING "I:46hVvcH:f:U:p:d:S:D:"
#endif
extern int verbose;
@@ -228,6 +228,8 @@ ipmi_option_usage(const char * progname, struct ipmi_cmd * cmdlist, struct ipmi_
lprintf(LOG_NOTICE, " -S sdr Use local file for remote SDR cache");
lprintf(LOG_NOTICE, " -D tty:b[:s] Specify the serial device, baud rate to use");
lprintf(LOG_NOTICE, " and, optionally, specify that interface is the system one");
+ lprintf(LOG_NOTICE, " -4 Use only IPv4");
+ lprintf(LOG_NOTICE, " -6 Use only IPv6");
#ifdef ENABLE_ALL_OPTIONS
lprintf(LOG_NOTICE, " -a Prompt for remote password");
lprintf(LOG_NOTICE, " -Y Prompt for the Kg key for IPMIv2 authentication");
@@ -401,6 +403,7 @@ ipmi_main(int argc, char ** argv,
int cipher_suite_id = 3; /* See table 22-19 of the IPMIv2 spec */
int argflag, i, found;
int rc = -1;
+ int ai_family = AF_UNSPEC;
char sol_escape_char = SOL_ESCAPE_CHARACTER_DEFAULT;
char * devfile = NULL;
@@ -626,6 +629,38 @@ ipmi_main(int argc, char ** argv,
goto out_free;
}
break;
+ case '4':
+ /* IPv4 only */
+ if (ai_family == AF_UNSPEC) {
+ ai_family = AF_INET;
+ } else {
+ if (ai_family == AF_INET6) {
+ lprintf(LOG_ERR,
+ "Parameter is mutually exclusive with -6.");
+ } else {
+ lprintf(LOG_ERR,
+ "Multiple -4 parameters given.");
+ }
+ rc = (-1);
+ goto out_free;
+ }
+ break;
+ case '6':
+ /* IPv6 only */
+ if (ai_family == AF_UNSPEC) {
+ ai_family = AF_INET6;
+ } else {
+ if (ai_family == AF_INET) {
+ lprintf(LOG_ERR,
+ "Parameter is mutually exclusive with -4.");
+ } else {
+ lprintf(LOG_ERR,
+ "Multiple -6 parameters given.");
+ }
+ rc = (-1);
+ goto out_free;
+ }
+ break;
#ifdef ENABLE_ALL_OPTIONS
case 'o':
if (oemtype) {
@@ -909,6 +944,7 @@ ipmi_main(int argc, char ** argv,
/* setup device file if given */
ipmi_main_intf->devfile = devfile;
+ ipmi_main_intf->ai_family = ai_family;
/* Open the interface with the specified or default IPMB address */
ipmi_main_intf->my_addr = arg_addr ? arg_addr : IPMI_BMC_SLAVE_ADDR;
if (ipmi_main_intf->open != NULL) {
diff --git a/src/plugins/ipmi_intf.c b/src/plugins/ipmi_intf.c
index 6bb7008..19ba5e3 100644
--- a/src/plugins/ipmi_intf.c
+++ b/src/plugins/ipmi_intf.c
@@ -350,7 +350,7 @@ ipmi_intf_socket_connect(struct ipmi_intf * intf)
sprintf(service, "%d", params->port);
/* Obtain address(es) matching host/port */
memset(&hints, 0, sizeof(hints));
- hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */
+ hints.ai_family = intf->ai_family; /* Allow IPv4 or IPv6 */
hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */
hints.ai_flags = 0; /* use AI_NUMERICSERV for no name resolution */
hints.ai_protocol = IPPROTO_UDP; /* */
-----------------------------------------------------------------------
Summary of changes:
include/ipmitool/ipmi_intf.h | 1 +
lib/ipmi_channel.c | 4 +-
lib/ipmi_lanp.c | 2 -
lib/ipmi_main.c | 63 +++++++++++++++++++++++++++++++++--------
lib/ipmi_picmg.c | 6 +--
lib/ipmi_vita.c | 2 +-
src/plugins/ipmi_intf.c | 2 +-
src/plugins/lanplus/lanplus.c | 12 +++++--
8 files changed, 66 insertions(+), 26 deletions(-)
hooks/post-receive
--
ipmitool
|