remove merged/unused patches
remove el6 from version string reported from iscsiadm
This commit is contained in:
parent
2f575ee31b
commit
7cde9befad
@ -5,7 +5,7 @@
|
||||
* some other maintainer could merge a patch without going through us
|
||||
*/
|
||||
-#define ISCSI_VERSION_STR "2.0-873"
|
||||
+#define ISCSI_VERSION_STR "6.2.0-873.2.el6"
|
||||
+#define ISCSI_VERSION_STR "6.2.0-873.2"
|
||||
#define ISCSI_VERSION_FILE "/sys/module/scsi_transport_iscsi/version"
|
||||
|
||||
#endif
|
||||
|
@ -1,19 +0,0 @@
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsi_uio/docs/iscsiuio.8 open-iscsi-2.0-872-rc4-bnx2i.work/iscsiuio/docs/iscsiuio.8
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/docs/iscsiuio.8 2011-01-31 19:38:19.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/iscsiuio/docs/iscsiuio.8 2011-01-31 19:38:44.000000000 -0600
|
||||
@@ -67,6 +67,15 @@ into the background.
|
||||
.TP
|
||||
.BI -v
|
||||
This is to print the version.
|
||||
+.PP
|
||||
+.TP
|
||||
+.BI -p <pidfile>
|
||||
+Use pidfile (default /var/run/iscsiuio.pid )
|
||||
+.PP
|
||||
+.TP
|
||||
+.BI -h
|
||||
+Display this help and exit.
|
||||
+
|
||||
|
||||
.\"
|
||||
.\" AUTHOR part
|
@ -1,47 +0,0 @@
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/utils/open-isns/db-policy.c open-iscsi-2.0-872-rc4-bnx2i.build/utils/open-isns/db-policy.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/utils/open-isns/db-policy.c 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/utils/open-isns/db-policy.c 2011-09-01 20:31:39.000000000 -0500
|
||||
@@ -7,8 +7,10 @@
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
+#ifdef WITH_SECURITY
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/err.h>
|
||||
+#endif
|
||||
#include "isns.h"
|
||||
#include "security.h"
|
||||
#include "objects.h"
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/utils/open-isns/security.h open-iscsi-2.0-872-rc4-bnx2i.build/utils/open-isns/security.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/utils/open-isns/security.h 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/utils/open-isns/security.h 2011-09-01 20:31:39.000000000 -0500
|
||||
@@ -6,11 +6,16 @@
|
||||
|
||||
#ifndef ISNS_SECURITY_H
|
||||
#define ISNS_SECURITY_H
|
||||
-
|
||||
-#include <openssl/evp.h>
|
||||
#include "buffer.h"
|
||||
#include "util.h"
|
||||
|
||||
+
|
||||
+#ifdef WITH_SECURITY
|
||||
+#include <openssl/evp.h>
|
||||
+#else
|
||||
+#define EVP_PKEY void
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Security context
|
||||
*/
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/utils/open-isns/util.h open-iscsi-2.0-872-rc4-bnx2i.build/utils/open-isns/util.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/utils/open-isns/util.h 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/utils/open-isns/util.h 2011-09-01 20:31:39.000000000 -0500
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
+#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h> // for strdup
|
@ -1,172 +0,0 @@
|
||||
commit ac38eee2083821eb29d098227ad044c950d115e4
|
||||
Author: Mike Christie <michaelc@cs.wisc.edu>
|
||||
Date: Sun Aug 14 22:14:04 2011 -0500
|
||||
|
||||
iscsi tools: fix default iface binding setup
|
||||
|
||||
If a driver supports multiple ifaces only one is getting
|
||||
auto created. This modifies the default iface setup code
|
||||
so that it creates a iface per kernel iface or a iface per
|
||||
host if kernel ifaces are not supported.
|
||||
|
||||
diff --git a/usr/iface.c b/usr/iface.c
|
||||
index 5d5f7bf..9c70d09 100644
|
||||
--- a/usr/iface.c
|
||||
+++ b/usr/iface.c
|
||||
@@ -424,12 +424,61 @@ int iface_get_by_net_binding(struct iface_rec *pattern,
|
||||
return ISCSI_ERR_NO_OBJS_FOUND;
|
||||
}
|
||||
|
||||
+static int iface_get_iptype(struct iface_rec *iface)
|
||||
+{
|
||||
+ if (strcmp(iface->bootproto, "dhcp") && !strstr(iface->ipaddress, "."))
|
||||
+ return ISCSI_IFACE_TYPE_IPV6;
|
||||
+ else
|
||||
+ return ISCSI_IFACE_TYPE_IPV4;
|
||||
+}
|
||||
+
|
||||
+static int iface_setup_binding_from_kern_iface(void *data,
|
||||
+ struct iface_rec *kern_iface)
|
||||
+{
|
||||
+ struct host_info *hinfo = data;
|
||||
+ struct iface_rec iface;
|
||||
+
|
||||
+ if (!strlen(hinfo->iface.hwaddress)) {
|
||||
+ log_error("Invalid offload iSCSI host %u. Missing "
|
||||
+ "hwaddress. Try upgrading %s driver.\n",
|
||||
+ hinfo->host_no, hinfo->iface.transport_name);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ memset(&iface, 0, sizeof(struct iface_rec));
|
||||
+ strcpy(iface.hwaddress, hinfo->iface.hwaddress);
|
||||
+ strcpy(iface.transport_name, hinfo->iface.transport_name);
|
||||
+
|
||||
+ if (kern_iface) {
|
||||
+ iface.iface_num = kern_iface->iface_num;
|
||||
+
|
||||
+ snprintf(iface.name, sizeof(iface.name), "%s.%s.%s.%u",
|
||||
+ kern_iface->transport_name,
|
||||
+ kern_iface->hwaddress,
|
||||
+ iface_get_iptype(kern_iface) == ISCSI_IFACE_TYPE_IPV4 ?
|
||||
+ "ipv4" : "ipv6", kern_iface->iface_num);
|
||||
+ } else {
|
||||
+ snprintf(iface.name, sizeof(iface.name), "%s.%s",
|
||||
+ hinfo->iface.transport_name, hinfo->iface.hwaddress);
|
||||
+ }
|
||||
+
|
||||
+ if (iface_conf_read(&iface)) {
|
||||
+ /* not found so create it */
|
||||
+ if (iface_conf_write(&iface)) {
|
||||
+ log_error("Could not create default iface conf %s.",
|
||||
+ iface.name);
|
||||
+ /* fall through - will not be persistent */
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int __iface_setup_host_bindings(void *data, struct host_info *hinfo)
|
||||
{
|
||||
struct iface_rec *def_iface;
|
||||
- struct iface_rec iface;
|
||||
struct iscsi_transport *t;
|
||||
- int i = 0;
|
||||
+ int i = 0, nr_found;
|
||||
|
||||
t = iscsi_sysfs_get_transport_by_hba(hinfo->host_no);
|
||||
if (!t)
|
||||
@@ -441,26 +490,12 @@ static int __iface_setup_host_bindings(void *data, struct host_info *hinfo)
|
||||
return 0;
|
||||
}
|
||||
|
||||
- if (iface_get_by_net_binding(&hinfo->iface, &iface) ==
|
||||
- ISCSI_ERR_NO_OBJS_FOUND) {
|
||||
- /* Must be a new port */
|
||||
- if (!strlen(hinfo->iface.hwaddress)) {
|
||||
- log_error("Invalid offload iSCSI host %u. Missing "
|
||||
- "hwaddress. Try upgrading %s driver.\n",
|
||||
- hinfo->host_no, t->name);
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- memset(&iface, 0, sizeof(struct iface_rec));
|
||||
- strcpy(iface.hwaddress, hinfo->iface.hwaddress);
|
||||
- strcpy(iface.transport_name, hinfo->iface.transport_name);
|
||||
- snprintf(iface.name, sizeof(iface.name), "%s.%s",
|
||||
- t->name, hinfo->iface.hwaddress);
|
||||
- if (iface_conf_write(&iface))
|
||||
- log_error("Could not create default iface conf %s.",
|
||||
- iface.name);
|
||||
- /* fall through - will not be persistent */
|
||||
- }
|
||||
+ nr_found = 0;
|
||||
+ iscsi_sysfs_for_each_iface_on_host(hinfo, hinfo->host_no,
|
||||
+ &nr_found,
|
||||
+ iface_setup_binding_from_kern_iface);
|
||||
+ if (!nr_found)
|
||||
+ iface_setup_binding_from_kern_iface(hinfo, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -843,7 +878,6 @@ int iface_setup_from_boot_context(struct iface_rec *iface,
|
||||
memset(iface->name, 0, sizeof(iface->name));
|
||||
snprintf(iface->name, sizeof(iface->name), "%s.%s",
|
||||
iface->transport_name, context->mac);
|
||||
-
|
||||
strlcpy(iface->hwaddress, context->mac,
|
||||
sizeof(iface->hwaddress));
|
||||
strlcpy(iface->ipaddress, context->ipaddr,
|
||||
@@ -921,9 +955,7 @@ static int __iface_get_param_count(void *data, struct iface_rec *iface)
|
||||
if (strcmp(iface_params->primary->hwaddress, iface->hwaddress))
|
||||
return 0;
|
||||
|
||||
- if (strcmp(iface->bootproto, "dhcp") && !strstr(iface->ipaddress, "."))
|
||||
- iptype = ISCSI_IFACE_TYPE_IPV6;
|
||||
-
|
||||
+ iptype = iface_get_iptype(iface);
|
||||
if (iptype == ISCSI_IFACE_TYPE_IPV4) {
|
||||
|
||||
if (strcmp(iface->state, "disable")) {
|
||||
@@ -1466,12 +1498,10 @@ static int __iface_build_net_config(void *data, struct iface_rec *iface)
|
||||
if (strcmp(net_config->primary->hwaddress, iface->hwaddress))
|
||||
return 0;
|
||||
|
||||
- if (strcmp(iface->bootproto, "dhcp") && !strstr(iface->ipaddress, "."))
|
||||
- iptype = ISCSI_IFACE_TYPE_IPV6;
|
||||
-
|
||||
/* start at 2, because 0 is for nlmsghdr and 1 for event */
|
||||
iov = net_config->iovs + 2;
|
||||
|
||||
+ iptype = iface_get_iptype(iface);
|
||||
if (iptype == ISCSI_IFACE_TYPE_IPV4) {
|
||||
if (!strcmp(iface->state, "disable")) {
|
||||
if (!iface_fill_net_state(&iov[net_config->count],
|
||||
diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c
|
||||
index 995549e..961cefd 100644
|
||||
--- a/usr/iscsi_sysfs.c
|
||||
+++ b/usr/iscsi_sysfs.c
|
||||
@@ -425,9 +425,10 @@ uint32_t iscsi_sysfs_get_host_no_from_hwinfo(struct iface_rec *iface, int *rc)
|
||||
static int iscsi_sysfs_read_iface(struct iface_rec *iface, int host_no,
|
||||
char *session, char *iface_kern_id)
|
||||
{
|
||||
+ uint32_t tmp_host_no, iface_num;
|
||||
char host_id[NAME_SIZE];
|
||||
struct iscsi_transport *t;
|
||||
- int ret;
|
||||
+ int ret, iface_type;
|
||||
|
||||
t = iscsi_sysfs_get_transport_by_hba(host_no);
|
||||
if (!t)
|
||||
@@ -582,6 +583,10 @@ static int iscsi_sysfs_read_iface(struct iface_rec *iface, int host_no,
|
||||
&iface->vlan_id);
|
||||
sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS, "vlan_priority",
|
||||
&iface->vlan_priority);
|
||||
+
|
||||
+ if (sscanf(iface_kern_id, "ipv%d-iface-%u-%u", &iface_type,
|
||||
+ &tmp_host_no, &iface_num) == 3)
|
||||
+ iface->iface_num = iface_num;
|
||||
done:
|
||||
if (ret)
|
||||
return ISCSI_ERR_SYSFS_LOOKUP;
|
@ -1,13 +0,0 @@
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c open-iscsi-2.0-872-rc4-bnx2i.build/usr/initiator.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/initiator.c 2011-09-01 20:29:49.000000000 -0500
|
||||
@@ -484,8 +484,7 @@ cleanup:
|
||||
if (session->id != -1) {
|
||||
log_debug(2, "kdestroy session %u", session->id);
|
||||
session->r_stage = R_STAGE_SESSION_DESTOYED;
|
||||
- err = ipc->destroy_session(session->t->handle, session->id);
|
||||
- if (err) {
|
||||
+ if (ipc->destroy_session(session->t->handle, session->id)) {
|
||||
log_error("can not safely destroy session %d",
|
||||
session->id);
|
||||
return ISCSI_ERR_INTERNAL;
|
@ -1,12 +0,0 @@
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/netlink.c open-iscsi-2.0-872-rc4-bnx2i.test/usr/netlink.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/netlink.c 2011-09-20 18:01:34.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.test/usr/netlink.c 2011-09-20 18:01:54.000000000 -0500
|
||||
@@ -185,7 +185,7 @@ kwritev(enum iscsi_uevent_e type, struct
|
||||
for (i = 1; i < count; i++)
|
||||
datalen += iovp[i].iov_len;
|
||||
|
||||
- nlh->nlmsg_len = NLMSG_ALIGN(datalen);
|
||||
+ nlh->nlmsg_len = datalen + sizeof(*nlh);
|
||||
nlh->nlmsg_pid = getpid();
|
||||
nlh->nlmsg_flags = 0;
|
||||
nlh->nlmsg_type = type;
|
@ -1,471 +0,0 @@
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/include/iscsi_if.h open-iscsi-2.0-872-rc4-bnx2i.work/include/iscsi_if.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/include/iscsi_if.h 2011-10-10 13:57:38.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/include/iscsi_if.h 2011-10-11 00:40:49.000000000 -0500
|
||||
@@ -320,10 +320,11 @@ enum iscsi_net_param {
|
||||
ISCSI_NET_PARAM_VLAN_ID = 13,
|
||||
ISCSI_NET_PARAM_VLAN_PRIORITY = 14,
|
||||
ISCSI_NET_PARAM_VLAN_ENABLED = 15,
|
||||
- ISCSI_NET_PARAM_IFACE_TYPE = 16,
|
||||
- ISCSI_NET_PARAM_IFACE_NAME = 17,
|
||||
- ISCSI_NET_PARAM_MTU = 18,
|
||||
- ISCSI_NET_PARAM_PORT = 19,
|
||||
+ ISCSI_NET_PARAM_VLAN_TAG = 16,
|
||||
+ ISCSI_NET_PARAM_IFACE_TYPE = 17,
|
||||
+ ISCSI_NET_PARAM_IFACE_NAME = 18,
|
||||
+ ISCSI_NET_PARAM_MTU = 19,
|
||||
+ ISCSI_NET_PARAM_PORT = 20,
|
||||
};
|
||||
|
||||
enum iscsi_conn_state {
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/host.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/host.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/host.c 2011-10-10 13:57:38.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/host.c 2011-10-11 00:41:01.000000000 -0500
|
||||
@@ -132,22 +132,67 @@ static int print_host_iface(void *data,
|
||||
printf("%sIPaddress: %s\n", prefix, UNKNOWN_VALUE);
|
||||
else if (strchr(iface->ipaddress, '.')) {
|
||||
printf("%sIPaddress: %s\n", prefix, iface->ipaddress);
|
||||
- printf("%sGateway: %s\n", prefix, iface->gateway);
|
||||
- printf("%sSubnet: %s\n", prefix, iface->subnet_mask);
|
||||
- printf("%sBootProto: %s\n", prefix, iface->bootproto);
|
||||
+
|
||||
+ if (!strlen(iface->gateway))
|
||||
+ printf("%sGateway: %s\n", prefix, UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sGateway: %s\n", prefix, iface->gateway);
|
||||
+ if (!strlen(iface->subnet_mask))
|
||||
+ printf("%sSubnet: %s\n", prefix, UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sSubnet: %s\n", prefix, iface->subnet_mask);
|
||||
+ if (!strlen(iface->bootproto))
|
||||
+ printf("%sBootProto: %s\n", prefix, UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sBootProto: %s\n", prefix, iface->bootproto);
|
||||
} else {
|
||||
printf("%sIPaddress: [%s]\n", prefix, iface->ipaddress);
|
||||
- printf("%sIPaddress Autocfg: %s\n", prefix, iface->ipv6_autocfg);
|
||||
- printf("%sLink Local Address: [%s]\n", prefix,
|
||||
- iface->ipv6_linklocal);
|
||||
- printf("%sLink Local Autocfg: %s\n", prefix,
|
||||
- iface->linklocal_autocfg);
|
||||
- printf("%sRouter Address: [%s]\n", prefix, iface->ipv6_router);
|
||||
+
|
||||
+ if (!strlen(iface->ipv6_autocfg))
|
||||
+ printf("%sIPaddress Autocfg: %s\n", prefix,
|
||||
+ UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sIPaddress Autocfg: %s\n", prefix,
|
||||
+ iface->ipv6_autocfg);
|
||||
+ if (!strlen(iface->ipv6_linklocal))
|
||||
+ printf("%sLink Local Address: %s\n", prefix,
|
||||
+ UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sLink Local Address: [%s]\n", prefix,
|
||||
+ iface->ipv6_linklocal);
|
||||
+ if (!strlen(iface->linklocal_autocfg))
|
||||
+ printf("%sLink Local Autocfg: %s\n", prefix,
|
||||
+ UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sLink Local Autocfg: %s\n", prefix,
|
||||
+ iface->linklocal_autocfg);
|
||||
+ if (!strlen(iface->ipv6_router))
|
||||
+ printf("%sRouter Address: %s\n", prefix,
|
||||
+ UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sRouter Address: [%s]\n", prefix,
|
||||
+ iface->ipv6_router);
|
||||
}
|
||||
|
||||
- printf("%sMTU: %u\n", prefix, iface->mtu);
|
||||
- printf("%svlan ID: %u\n", prefix, iface->vlan_id);
|
||||
- printf("%svlan priority: %u\n", prefix, iface->vlan_priority);
|
||||
+ if (!iface->port)
|
||||
+ printf("%sPort: %s\n", prefix, UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sPort: %u\n", prefix, iface->port);
|
||||
+
|
||||
+ if (!iface->mtu)
|
||||
+ printf("%sMTU: %s\n", prefix, UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sMTU: %u\n", prefix, iface->mtu);
|
||||
+
|
||||
+ if (iface->vlan_id == UINT16_MAX)
|
||||
+ printf("%sVLAN ID: %s\n", prefix, UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sVLAN ID: %u\n", prefix, iface->vlan_id);
|
||||
+
|
||||
+ if (iface->vlan_priority == UINT8_MAX)
|
||||
+ printf("%sVLAN priority: %s\n", prefix, UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sVLAN priority: %u\n", prefix, iface->vlan_priority);
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/iface.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/iface.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/iface.c 2011-10-10 13:57:38.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iface.c 2011-10-11 00:40:49.000000000 -0500
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "fw_context.h"
|
||||
#include "sysdeps.h"
|
||||
#include "iscsi_err.h"
|
||||
+#include "iscsi_netlink.h"
|
||||
|
||||
/*
|
||||
* Default ifaces for use with transports that do not bind to hardware
|
||||
@@ -1141,14 +1142,16 @@ static int iface_fill_port(struct iovec
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
uint16_t port = 3260;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
- len = sizeof(struct iscsi_iface_param_info) + 2;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
- if (!(iov->iov_base))
|
||||
+ len = sizeof(struct iscsi_iface_param_info) + sizeof(port);
|
||||
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_PORT, len);
|
||||
+ if (!iov->iov_base)
|
||||
return 1;
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
net_param->param = ISCSI_NET_PARAM_PORT;
|
||||
net_param->iface_type = iface_type;
|
||||
net_param->iface_num = iface->iface_num;
|
||||
@@ -1166,14 +1169,16 @@ static int iface_fill_mtu(struct iovec *
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
uint16_t mtu = 0;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
len = sizeof(struct iscsi_iface_param_info) + 2;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_MTU, len);
|
||||
if (!(iov->iov_base))
|
||||
return 1;
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
net_param->param = ISCSI_NET_PARAM_MTU;
|
||||
net_param->iface_type = iface_type;
|
||||
net_param->iface_num = iface->iface_num;
|
||||
@@ -1191,15 +1196,17 @@ static int iface_fill_vlan_id(struct iov
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
uint16_t vlan = 0;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
len = sizeof(struct iscsi_iface_param_info) + 2;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_VLAN_TAG, len);
|
||||
if (!(iov->iov_base))
|
||||
return 1;
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
- net_param->param = ISCSI_NET_PARAM_VLAN_ID;
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
+ net_param->param = ISCSI_NET_PARAM_VLAN_TAG;
|
||||
net_param->iface_type = iface_type;
|
||||
net_param->iface_num = iface->iface_num;
|
||||
net_param->param_type = ISCSI_NET_PARAM;
|
||||
@@ -1222,14 +1229,16 @@ static int iface_fill_vlan_state(struct
|
||||
{
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
len = sizeof(struct iscsi_iface_param_info) + 1;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_VLAN_ENABLED, len);
|
||||
if (!(iov->iov_base))
|
||||
return 1;
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
net_param->param = ISCSI_NET_PARAM_VLAN_ENABLED;
|
||||
net_param->iface_type = iface_type;
|
||||
net_param->iface_num = iface->iface_num;
|
||||
@@ -1248,14 +1257,16 @@ static int iface_fill_net_state(struct i
|
||||
{
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
len = sizeof(struct iscsi_iface_param_info) + 1;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_IFACE_ENABLE, len);
|
||||
if (!(iov->iov_base))
|
||||
return 1;
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
net_param->param = ISCSI_NET_PARAM_IFACE_ENABLE;
|
||||
net_param->iface_type = iface_type;
|
||||
net_param->iface_num = iface->iface_num;
|
||||
@@ -1273,14 +1284,16 @@ static int iface_fill_net_bootproto(stru
|
||||
{
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
len = sizeof(struct iscsi_iface_param_info) + 1;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_IPV4_BOOTPROTO, len);
|
||||
if (!(iov->iov_base))
|
||||
return 1;
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
net_param->param = ISCSI_NET_PARAM_IPV4_BOOTPROTO;
|
||||
net_param->iface_type = ISCSI_IFACE_TYPE_IPV4;
|
||||
net_param->iface_num = iface->iface_num;
|
||||
@@ -1298,14 +1311,16 @@ static int iface_fill_net_autocfg(struct
|
||||
{
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
len = sizeof(struct iscsi_iface_param_info) + 1;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_IPV6_ADDR_AUTOCFG, len);
|
||||
if (!(iov->iov_base))
|
||||
return 1;
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
net_param->param = ISCSI_NET_PARAM_IPV6_ADDR_AUTOCFG;
|
||||
net_param->iface_type = ISCSI_IFACE_TYPE_IPV6;
|
||||
net_param->param_type = ISCSI_NET_PARAM;
|
||||
@@ -1327,14 +1342,17 @@ static int iface_fill_linklocal_autocfg(
|
||||
{
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
len = sizeof(struct iscsi_iface_param_info) + 1;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_IPV6_LINKLOCAL_AUTOCFG,
|
||||
+ len);
|
||||
if (!(iov->iov_base))
|
||||
return 1;
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
net_param->param = ISCSI_NET_PARAM_IPV6_LINKLOCAL_AUTOCFG;
|
||||
net_param->iface_type = ISCSI_IFACE_TYPE_IPV6;
|
||||
net_param->param_type = ISCSI_NET_PARAM;
|
||||
@@ -1353,14 +1371,17 @@ static int iface_fill_router_autocfg(str
|
||||
{
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
len = sizeof(struct iscsi_iface_param_info) + 1;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_IPV6_ROUTER_AUTOCFG,
|
||||
+ len);
|
||||
if (!(iov->iov_base))
|
||||
return 1;
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
net_param->param = ISCSI_NET_PARAM_IPV6_ROUTER_AUTOCFG;
|
||||
net_param->iface_type = ISCSI_IFACE_TYPE_IPV6;
|
||||
net_param->param_type = ISCSI_NET_PARAM;
|
||||
@@ -1381,14 +1402,16 @@ static int iface_fill_net_ipv4_addr(stru
|
||||
int rc = 1;
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
len = sizeof(struct iscsi_iface_param_info) + 4;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
+ iov->iov_base = iscsi_nla_alloc(param, len);
|
||||
if (!(iov->iov_base))
|
||||
return 1;
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
net_param->param = param;
|
||||
net_param->iface_type = ISCSI_IFACE_TYPE_IPV4;
|
||||
net_param->iface_num = iface->iface_num;
|
||||
@@ -1435,14 +1458,16 @@ static int iface_fill_net_ipv6_addr(stru
|
||||
int rc;
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
len = sizeof(struct iscsi_iface_param_info) + 16;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
+ iov->iov_base = iscsi_nla_alloc(param, len);
|
||||
if (!(iov->iov_base))
|
||||
return 1;
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
net_param->param = param;
|
||||
net_param->iface_type = ISCSI_IFACE_TYPE_IPV6;
|
||||
net_param->iface_num = iface->iface_num;
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/initiator.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c 2011-10-10 13:57:38.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/initiator.c 2011-10-11 00:39:57.000000000 -0500
|
||||
@@ -1682,9 +1682,10 @@ static void session_conn_process_login(v
|
||||
session->nrec.conn[conn->id].address,
|
||||
session->nrec.conn[conn->id].port,
|
||||
session->nrec.iface.name);
|
||||
- } else
|
||||
+ } else {
|
||||
session->notify_qtask = NULL;
|
||||
-
|
||||
+ mgmt_ipc_write_rsp(c->qtask, ISCSI_SUCCESS);
|
||||
+ }
|
||||
|
||||
/*
|
||||
* reset ERL=0 reopen counter
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_netlink.h open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_netlink.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_netlink.h 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_netlink.h 2011-10-11 00:40:34.000000000 -0500
|
||||
@@ -0,0 +1,33 @@
|
||||
+/*
|
||||
+ * iSCSI Netlink attr helpers
|
||||
+ *
|
||||
+ * Copyright (C) 2011 Red Hat, Inc. All rights reserved.
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published
|
||||
+ * by the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful, but
|
||||
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * General Public License for more details.
|
||||
+ *
|
||||
+ * See the file COPYING included with this distribution for more details.
|
||||
+ */
|
||||
+
|
||||
+#ifndef ISCSI_NLA_H
|
||||
+#define ISCSI_NLA_H
|
||||
+
|
||||
+#include <linux/netlink.h>
|
||||
+
|
||||
+struct iovec;
|
||||
+
|
||||
+#define ISCSI_NLA_HDRLEN ((int) NLA_ALIGN(sizeof(struct nlattr)))
|
||||
+#define ISCSI_NLA_DATA(nla) ((void *)((char*)(nla) + ISCSI_NLA_HDRLEN))
|
||||
+#define ISCSI_NLA_LEN(len) ((len) + NLA_ALIGN(ISCSI_NLA_HDRLEN))
|
||||
+#define ISCSI_NLA_TOTAL_LEN(len) (NLA_ALIGN(ISCSI_NLA_LEN(len)))
|
||||
+
|
||||
+extern struct nlattr *iscsi_nla_alloc(uint16_t type, uint16_t len);
|
||||
+
|
||||
+#endif
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_sysfs.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_sysfs.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_sysfs.c 2011-10-10 13:57:38.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_sysfs.c 2011-10-11 00:41:01.000000000 -0500
|
||||
@@ -561,28 +561,28 @@ static int iscsi_sysfs_read_iface(struct
|
||||
"link_local_addr", iface->ipv6_linklocal,
|
||||
sizeof(iface->ipv6_linklocal));
|
||||
|
||||
- if (sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
||||
- "linklocal_autocfg",
|
||||
- iface->linklocal_autocfg,
|
||||
- sizeof(iface->linklocal_autocfg))) {
|
||||
- /* misspelled in some test kernels */
|
||||
- sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
||||
- "link_local_autocfg",
|
||||
- iface->linklocal_autocfg,
|
||||
- sizeof(iface->linklocal_autocfg));
|
||||
- }
|
||||
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
||||
+ "link_local_autocfg", iface->linklocal_autocfg,
|
||||
+ sizeof(iface->linklocal_autocfg));
|
||||
|
||||
sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "router_addr",
|
||||
iface->ipv6_router,
|
||||
sizeof(iface->ipv6_router));
|
||||
}
|
||||
|
||||
- sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS, "mtu",
|
||||
- &iface->mtu);
|
||||
- sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS, "vlan",
|
||||
- &iface->vlan_id);
|
||||
- sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS, "vlan_priority",
|
||||
- &iface->vlan_priority);
|
||||
+ if (sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS, "port",
|
||||
+ &iface->port))
|
||||
+ iface->port = 0;
|
||||
+ if (sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS, "mtu",
|
||||
+ &iface->mtu))
|
||||
+ iface->mtu = 0;
|
||||
+ if (sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS, "vlan_id",
|
||||
+ &iface->vlan_id))
|
||||
+ iface->vlan_id = UINT16_MAX;
|
||||
+
|
||||
+ if (sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS, "vlan_priority",
|
||||
+ &iface->vlan_priority))
|
||||
+ iface->vlan_priority = UINT8_MAX;
|
||||
|
||||
if (sscanf(iface_kern_id, "ipv%d-iface-%u-%u", &iface_type,
|
||||
&tmp_host_no, &iface_num) == 3)
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/netlink.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/netlink.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/netlink.c 2011-10-10 13:57:38.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/netlink.c 2011-10-11 00:40:34.000000000 -0500
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "initiator.h"
|
||||
#include "iscsi_sysfs.h"
|
||||
#include "transport.h"
|
||||
+#include "iscsi_netlink.h"
|
||||
|
||||
static int ctrl_fd;
|
||||
static struct sockaddr_nl src_addr, dest_addr;
|
||||
@@ -63,6 +64,19 @@ static int ctldev_handle(void);
|
||||
|
||||
#define NLM_SETPARAM_DEFAULT_MAX (NI_MAXHOST + 1 + sizeof(struct iscsi_uevent))
|
||||
|
||||
+struct nlattr *iscsi_nla_alloc(uint16_t type, uint16_t len)
|
||||
+{
|
||||
+ struct nlattr *attr;
|
||||
+
|
||||
+ attr = calloc(1, ISCSI_NLA_TOTAL_LEN(len));
|
||||
+ if (!attr)
|
||||
+ return NULL;
|
||||
+
|
||||
+ attr->nla_len = ISCSI_NLA_LEN(len);
|
||||
+ attr->nla_type = type;
|
||||
+ return attr;
|
||||
+}
|
||||
+
|
||||
static int
|
||||
kread(char *data, int count)
|
||||
{
|
@ -1,371 +0,0 @@
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/configure open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/configure
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/configure 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/configure 2011-09-01 20:33:58.000000000 -0500
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
-# Generated by GNU Autoconf 2.59 for iscsiuio 0.7.0.12.
|
||||
+# Generated by GNU Autoconf 2.59 for iscsiuio 0.7.0.14.
|
||||
#
|
||||
# Report bugs to <eddie.wai@broadcom.com>.
|
||||
#
|
||||
@@ -423,8 +423,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='iscsiuio'
|
||||
PACKAGE_TARNAME='iscsiuio'
|
||||
-PACKAGE_VERSION='0.7.0.12'
|
||||
-PACKAGE_STRING='iscsiuio 0.7.0.12'
|
||||
+PACKAGE_VERSION='0.7.0.14'
|
||||
+PACKAGE_STRING='iscsiuio 0.7.0.14'
|
||||
PACKAGE_BUGREPORT='eddie.wai@broadcom.com'
|
||||
|
||||
# Factoring default headers for most tests.
|
||||
@@ -954,7 +954,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
-\`configure' configures iscsiuio 0.7.0.12 to adapt to many kinds of systems.
|
||||
+\`configure' configures iscsiuio 0.7.0.14 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1020,7 +1020,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
- short | recursive ) echo "Configuration of iscsiuio 0.7.0.12:";;
|
||||
+ short | recursive ) echo "Configuration of iscsiuio 0.7.0.14:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1161,7 +1161,7 @@ fi
|
||||
test -n "$ac_init_help" && exit 0
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
-iscsiuio configure 0.7.0.12
|
||||
+iscsiuio configure 0.7.0.14
|
||||
generated by GNU Autoconf 2.59
|
||||
|
||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
@@ -1175,7 +1175,7 @@ cat >&5 <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
-It was created by iscsiuio $as_me 0.7.0.12, which was
|
||||
+It was created by iscsiuio $as_me 0.7.0.14, which was
|
||||
generated by GNU Autoconf 2.59. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -21726,7 +21726,7 @@ _ASBOX
|
||||
} >&5
|
||||
cat >&5 <<_CSEOF
|
||||
|
||||
-This file was extended by iscsiuio $as_me 0.7.0.12, which was
|
||||
+This file was extended by iscsiuio $as_me 0.7.0.14, which was
|
||||
generated by GNU Autoconf 2.59. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -21789,7 +21789,7 @@ _ACEOF
|
||||
|
||||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
ac_cs_version="\\
|
||||
-iscsiuio config.status 0.7.0.12
|
||||
+iscsiuio config.status 0.7.0.14
|
||||
configured by $0, generated by GNU Autoconf 2.59,
|
||||
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/configure.ac open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/configure.ac
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/configure.ac 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/configure.ac 2011-09-01 20:33:58.000000000 -0500
|
||||
@@ -11,9 +11,9 @@ dnl Maintained by: Eddie Wai (eddie.wai@
|
||||
dnl
|
||||
|
||||
PACKAGE=iscsiuio
|
||||
-VERSION=0.7.0.12
|
||||
+VERSION=0.7.0.14
|
||||
|
||||
-AC_INIT(iscsiuio, 0.7.0.12, eddie.wai@broadcom.com)
|
||||
+AC_INIT(iscsiuio, 0.7.0.14, eddie.wai@broadcom.com)
|
||||
|
||||
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/docs/iscsiuio.8 open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/docs/iscsiuio.8
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/docs/iscsiuio.8 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/docs/iscsiuio.8 2011-09-01 20:33:58.000000000 -0500
|
||||
@@ -3,9 +3,9 @@
|
||||
.\" modify it under the terms of the GNU General Public License as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
-.\" bnx2.4,v 0.7.0.12
|
||||
+.\" bnx2.4,v 0.7.0.14
|
||||
.\"
|
||||
-.TH iscsiuio 8 "08/04/2011" "Broadcom Corporation"
|
||||
+.TH iscsiuio 8 "08/23/2011" "Broadcom Corporation"
|
||||
.\"
|
||||
.\" NAME part
|
||||
.\"
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/include/uip_mgmt_ipc.h open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/include/uip_mgmt_ipc.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/include/uip_mgmt_ipc.h 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/include/uip_mgmt_ipc.h 2011-09-01 20:33:47.000000000 -0500
|
||||
@@ -50,11 +50,11 @@ typedef struct iscsid_uip_broadcast {
|
||||
|
||||
typedef enum iscsid_uip_mgmt_ipc_err {
|
||||
ISCSID_UIP_MGMT_IPC_OK = 0,
|
||||
- ISCISD_UIP_MGMT_IPC_ERR = 1,
|
||||
- ISCISD_UIP_MGMT_IPC_ERR_NOT_FOUND = 2,
|
||||
- ISCISD_UIP_MGMT_IPC_ERR_NOMEM = 3,
|
||||
- ISCISD_UIP_MGMT_IPC_DEVICE_UP = 4,
|
||||
- ISCISD_UIP_MGMT_IPC_DEVICE_INITIALIZING = 5,
|
||||
+ ISCSID_UIP_MGMT_IPC_ERR = 1,
|
||||
+ ISCSID_UIP_MGMT_IPC_ERR_NOT_FOUND = 2,
|
||||
+ ISCSID_UIP_MGMT_IPC_ERR_NOMEM = 3,
|
||||
+ ISCSID_UIP_MGMT_IPC_DEVICE_UP = 4,
|
||||
+ ISCSID_UIP_MGMT_IPC_DEVICE_INITIALIZING = 5,
|
||||
} iscsid_uip_mgmt_ipc_err_e;
|
||||
|
||||
/* IPC Response */
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/README open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/README
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/README 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/README 2011-09-01 20:33:58.000000000 -0500
|
||||
@@ -1,6 +1,6 @@
|
||||
-Broadcom iSCSI Userspace Tools
|
||||
-Version 0.7.0.12
|
||||
-Aug 04, 2011
|
||||
+iscsiuio Userspace Tools
|
||||
+Version 0.7.0.14
|
||||
+Aug 23, 2011
|
||||
------------------------------------------------------
|
||||
|
||||
This tools is to be used in conjunction with the Broadcom NetXtreme II Linux
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/RELEASE.TXT open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/RELEASE.TXT
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/RELEASE.TXT 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/RELEASE.TXT 2011-09-01 20:33:58.000000000 -0500
|
||||
@@ -1,7 +1,7 @@
|
||||
Release Notes
|
||||
Broadcom uIP Linux Driver
|
||||
- Version 0.7.0.12
|
||||
- 08/04/2011
|
||||
+ Version 0.7.0.14
|
||||
+ 08/23/2011
|
||||
|
||||
Broadcom Corporation
|
||||
5300 California Avenue,
|
||||
@@ -10,6 +10,36 @@
|
||||
Copyright (c) 2004 - 2011 Broadcom Corporation
|
||||
All rights reserved
|
||||
|
||||
+uIP v0.7.0.14 (Aug 23, 2011)
|
||||
+=======================================================
|
||||
+ Fixes
|
||||
+ -----
|
||||
+ 1. Problem: Cont00057840 - RHEL6.2 inbox: Unable to connect to
|
||||
+ targets with 5709
|
||||
+ Cause: For cases when the bnx2/bnx2x driver gets removed, the
|
||||
+ uio database that was built by cnic would have the device
|
||||
+ ->net reference removed. This has caused an unnecessary
|
||||
+ timeout of 5s for each stale uio entry in the database.
|
||||
+ Change: Adjusted the routine which seeks the device->net entry
|
||||
+ to include more logic instead of hard waiting for 5s.
|
||||
+
|
||||
+ Enhancements
|
||||
+ ------------
|
||||
+ 1. Change: Added support for RHEL6.2 for out-of-box release
|
||||
+ 2. Change: Updated the man page with -h and -p info
|
||||
+ 3. Change: Updated the -h info
|
||||
+
|
||||
+
|
||||
+uIP v0.7.0.13 (Aug 10, 2011)
|
||||
+=======================================================
|
||||
+ Fixes
|
||||
+ -----
|
||||
+ 1. Problem: Cont00057768 - iscsiuio logrotate causes daemon failure
|
||||
+ Cause: The logrotate script will send a SIGUSR1 signal to notify
|
||||
+ the iscsiuio daemon of such action. However, the daemon
|
||||
+ wasn't programmed to catch this signal.
|
||||
+ Change: Restored the catching of this signal
|
||||
+
|
||||
|
||||
uIP v0.7.0.12 (Aug 04, 2011)
|
||||
=======================================================
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/iscsid_ipc.c open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/iscsid_ipc.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/iscsid_ipc.c 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/iscsid_ipc.c 2011-09-01 20:33:53.000000000 -0500
|
||||
@@ -217,18 +217,23 @@ static int parse_iface(void *arg)
|
||||
struct in_addr netmask;
|
||||
int i, prefix_len = 64;
|
||||
struct ip_addr_mask ipam;
|
||||
+ struct iface_rec *rec;
|
||||
|
||||
data = (iscsid_uip_broadcast_t *) arg;
|
||||
|
||||
+ rec = &data->u.iface_rec.rec;
|
||||
LOG_INFO(PFX "Received request for '%s' to set IP address: '%s' "
|
||||
- "VLAN: '%d'",
|
||||
- data->u.iface_rec.rec.netdev,
|
||||
- data->u.iface_rec.rec.ipaddress, data->u.iface_rec.rec.vlan_id);
|
||||
+ "VLAN: '%d'", rec->netdev, rec->ipaddress, rec->vlan_id);
|
||||
|
||||
- vlan = data->u.iface_rec.rec.vlan_id;
|
||||
+ vlan = rec->vlan_id;
|
||||
+ if (vlan && valid_vlan(vlan) == 0) {
|
||||
+ LOG_ERR(PFX "Invalid VLAN tag: %d", rec->vlan_id);
|
||||
+ rc = -EIO;
|
||||
+ goto early_exit;
|
||||
+ }
|
||||
|
||||
/* Detect for CIDR notation and strip off the netmask if present */
|
||||
- rc = decode_cidr(data->u.iface_rec.rec.ipaddress, &ipam, &prefix_len);
|
||||
+ rc = decode_cidr(rec->ipaddress, &ipam, &prefix_len);
|
||||
if (rc && !ipam.ip_type) {
|
||||
LOG_ERR(PFX "decode_cidr: rc=%d, ipam.ip_type=%d",
|
||||
rc, ipam.ip_type)
|
||||
@@ -251,30 +256,29 @@ static int parse_iface(void *arg)
|
||||
|
||||
if (i >= 10) {
|
||||
LOG_WARN(PFX "Could not aquire nic_list_mutex lock");
|
||||
-
|
||||
rc = -EIO;
|
||||
goto early_exit;
|
||||
}
|
||||
|
||||
/* Check if we can find the NIC device using the netdev
|
||||
* name */
|
||||
- rc = from_netdev_name_find_nic(data->u.iface_rec.rec.netdev, &nic);
|
||||
+ rc = from_netdev_name_find_nic(rec->netdev, &nic);
|
||||
|
||||
if (rc != 0) {
|
||||
LOG_WARN(PFX "Couldn't find NIC: %s, creating an instance",
|
||||
- data->u.iface_rec.rec.netdev);
|
||||
+ rec->netdev);
|
||||
|
||||
nic = nic_init();
|
||||
if (nic == NULL) {
|
||||
LOG_ERR(PFX "Couldn't allocate space for NIC %s",
|
||||
- data->u.iface_rec.rec.netdev);
|
||||
+ rec->netdev);
|
||||
|
||||
rc = -ENOMEM;
|
||||
goto done;
|
||||
}
|
||||
|
||||
strncpy(nic->eth_device_name,
|
||||
- data->u.iface_rec.rec.netdev,
|
||||
+ rec->netdev,
|
||||
sizeof(nic->eth_device_name));
|
||||
nic->config_device_name = nic->eth_device_name;
|
||||
nic->log_name = nic->eth_device_name;
|
||||
@@ -288,7 +292,7 @@ static int parse_iface(void *arg)
|
||||
nic_add(nic);
|
||||
} else {
|
||||
LOG_INFO(PFX " %s, using existing NIC",
|
||||
- data->u.iface_rec.rec.netdev);
|
||||
+ rec->netdev);
|
||||
}
|
||||
|
||||
if (nic->flags & NIC_GOING_DOWN) {
|
||||
@@ -335,12 +339,12 @@ static int parse_iface(void *arg)
|
||||
&transport_name_size);
|
||||
|
||||
if (strncmp(transport_name,
|
||||
- data->u.iface_rec.rec.transport_name,
|
||||
+ rec->transport_name,
|
||||
transport_name_size) != 0) {
|
||||
LOG_ERR(PFX "%s Transport name is not equal "
|
||||
"expected: %s got: %s",
|
||||
nic->log_name,
|
||||
- data->u.iface_rec.rec.transport_name,
|
||||
+ rec->transport_name,
|
||||
transport_name);
|
||||
}
|
||||
} else {
|
||||
@@ -548,11 +552,10 @@ enable_nic:
|
||||
|
||||
LOG_INFO(PFX "ISCSID_UIP_IPC_GET_IFACE: command: %x "
|
||||
"name: %s, netdev: %s ipaddr: %s vlan: %d transport_name:%s",
|
||||
- data->header.command, data->u.iface_rec.rec.name,
|
||||
- data->u.iface_rec.rec.netdev,
|
||||
- (ipam.ip_type ==
|
||||
- AF_INET) ? inet_ntoa(ipam.addr4) : ipv6_buf_str, vlan,
|
||||
- data->u.iface_rec.rec.transport_name);
|
||||
+ data->header.command, rec->name, rec->netdev,
|
||||
+ (ipam.ip_type == AF_INET) ? inet_ntoa(ipam.addr4) :
|
||||
+ ipv6_buf_str,
|
||||
+ vlan, rec->transport_name);
|
||||
|
||||
done:
|
||||
pthread_mutex_unlock(&nic_list_mutex);
|
||||
@@ -617,15 +620,15 @@ int process_iscsid_broadcast(int s2)
|
||||
switch (rc) {
|
||||
case 0:
|
||||
rsp.command = cmd;
|
||||
- rsp.err = ISCISD_UIP_MGMT_IPC_DEVICE_UP;
|
||||
+ rsp.err = ISCSID_UIP_MGMT_IPC_DEVICE_UP;
|
||||
break;
|
||||
case -EAGAIN:
|
||||
rsp.command = cmd;
|
||||
- rsp.err = ISCISD_UIP_MGMT_IPC_DEVICE_INITIALIZING;
|
||||
+ rsp.err = ISCSID_UIP_MGMT_IPC_DEVICE_INITIALIZING;
|
||||
break;
|
||||
default:
|
||||
rsp.command = cmd;
|
||||
- rsp.err = ISCISD_UIP_MGMT_IPC_ERR;
|
||||
+ rsp.err = ISCSID_UIP_MGMT_IPC_ERR;
|
||||
}
|
||||
|
||||
break;
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/main.c open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/main.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/main.c 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/main.c 2011-09-01 20:33:42.000000000 -0500
|
||||
@@ -172,10 +172,10 @@ static void main_usage()
|
||||
|
||||
printf("\nUsage: %s [OPTION]\n", APP_NAME);
|
||||
printf("\
|
||||
-Broadcom uIP daemon.\n\
|
||||
+iscsiuio daemon.\n\
|
||||
-f, --foreground make the program run in the foreground\n\
|
||||
-d, --debug debuglevel print debugging information\n\
|
||||
- -p, --pid=pidfile use pid file (default %s ).\n\
|
||||
+ -p, --pid=pidfile use pid file (default %s).\n\
|
||||
-h, --help display this help and exit\n\
|
||||
-v, --version display version and exit\n\
|
||||
", default_pid_filepath);
|
||||
@@ -336,6 +336,7 @@ int main(int argc, char *argv[])
|
||||
sigaddset(&set, SIGINT);
|
||||
sigaddset(&set, SIGQUIT);
|
||||
sigaddset(&set, SIGTERM);
|
||||
+ sigaddset(&set, SIGUSR1);
|
||||
rc = pthread_sigmask(SIG_SETMASK, &set, NULL);
|
||||
|
||||
/* Spin off the signal handling thread */
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/nic_utils.c open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/nic_utils.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/nic_utils.c 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/nic_utils.c 2011-09-01 20:33:37.000000000 -0500
|
||||
@@ -473,6 +473,7 @@ static int from_uio_find_associated_eth_
|
||||
char *search_paths[] = { "/sys/class/uio/uio%i/device/",
|
||||
"/sys/class/uio/uio%i/device/net"
|
||||
};
|
||||
+ int path_to[] = { 5, 1 };
|
||||
int (*search_filters[]) (const struct dirent *) = {
|
||||
filter_net_name, filter_dot_out,};
|
||||
char *(*extract_name[]) (struct dirent ** files) = {
|
||||
@@ -492,7 +493,7 @@ static int from_uio_find_associated_eth_
|
||||
/* Build the path to determine uio name */
|
||||
rc = sprintf(path, search_paths[path_iterator], uio_minor);
|
||||
|
||||
- wait_for_file_node_timed(nic, path, 5);
|
||||
+ wait_for_file_node_timed(nic, path, path_to[path_iterator]);
|
||||
|
||||
count = scandir(path, &files,
|
||||
search_filters[path_iterator], alphasort);
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/options.h open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/options.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/options.h 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/options.h 2011-09-01 20:33:42.000000000 -0500
|
||||
@@ -78,7 +78,7 @@
|
||||
#define ETHERTYPE_VLAN 0x8100 /* IEEE 802.1Q VLAN tagging */
|
||||
#endif /* ETHERTYPE_VLAN */
|
||||
|
||||
-#define APP_NAME "uIP"
|
||||
+#define APP_NAME "iscsiuio"
|
||||
/* BUILD_DATE is automatically generated from the Makefile */
|
||||
|
||||
#define DEBUG_OFF 0x1
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user