[iscsi-initiator-utils: 37/109] Resolves: #463582 #529324

Chris Leech cleech at fedoraproject.org
Tue Dec 10 21:22:29 UTC 2013


commit 05db5ec53a7c9e9f96dfc9156b2129bc3b3e031e
Author: mchristi <mchristi at redhat.com>
Date:   Fri Jan 15 11:53:18 2010 +0000

    Resolves: #463582 #529324

 .cvsignore                                         |    1 +
 ...tch => iscsi-initiator-utils-add-libiscsi.patch |  470 +++++++++++---------
 iscsi-initiator-utils-ibft-sysfs.patch             |  312 -------------
 iscsi-initiator-utils-only-root-use.patch          |   16 -
 iscsi-initiator-utils-print-ibft-net-info.patch    |  219 ---------
 iscsi-initiator-utils-start-iscsid.patch           |  202 ---------
 iscsi-initiator-utils-uip-mgmt.patch               |  377 ++++++++++++++++
 ...itiator-utils-update-initscripts-and-docs.patch |   87 ++++-
 iscsi-initiator-utils-use-red-hat-for-name.patch   |    9 +-
 iscsi-initiator-utils-use-var-for-config.patch     |  110 +++--
 iscsi-initiator-utils.spec                         |   50 ++-
 iscsid.init                                        |    3 +
 open-iscsi-2.0-870.1-485217.patch                  |   38 --
 open-iscsi-2.0-870.1-fwparam-ppc-crash.patch       |   55 ---
 open-iscsi-2.0-870.1-ibft-newer-kernel.patch       |   44 --
 open-iscsi-2.0-870.1-no-exit.patch                 |  221 ---------
 sources                                            |    2 +-
 17 files changed, 827 insertions(+), 1389 deletions(-)
---
diff --git a/.cvsignore b/.cvsignore
index c77cdb1..f987f22 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1,2 @@
 open-iscsi-2.0-870.1.tar.gz
+open-iscsi-2.0-871.1.1-bnx2i.tar.gz
diff --git a/open-iscsi-2.0-870.1-add-libiscsi.patch b/iscsi-initiator-utils-add-libiscsi.patch
similarity index 92%
rename from open-iscsi-2.0-870.1-add-libiscsi.patch
rename to iscsi-initiator-utils-add-libiscsi.patch
index 0bc4628..ae90e86 100644
--- a/open-iscsi-2.0-870.1-add-libiscsi.patch
+++ b/iscsi-initiator-utils-add-libiscsi.patch
@@ -1,7 +1,75 @@
-diff -urN open-iscsi-2.0-870.1.orig/libiscsi/Makefile open-iscsi-2.0-870.1/libiscsi/Makefile
---- open-iscsi-2.0-870.1.orig/libiscsi/Makefile	1970-01-01 01:00:00.000000000 +0100
-+++ open-iscsi-2.0-870.1/libiscsi/Makefile	2009-01-28 14:28:54.000000000 +0100
-@@ -0,0 +1,54 @@
+From 2a2342c706783fc3cfd1dac7710dd8d8de835ebc Mon Sep 17 00:00:00 2001
+From: Mike Christie <michaelc at cs.wisc.edu>
+Date: Fri, 15 Jan 2010 03:08:06 -0600
+Subject: [PATCH] Add userspace libiscsi
+
+---
+ Makefile                                    |    2 +
+ libiscsi/Makefile                           |   64 ++
+ libiscsi/libiscsi.c                         |  562 ++++++++++
+ libiscsi/libiscsi.doxy                      | 1473 +++++++++++++++++++++++++++
+ libiscsi/libiscsi.h                         |  343 +++++++
+ libiscsi/pylibiscsi.c                       |  624 ++++++++++++
+ libiscsi/setup.py                           |    9 +
+ libiscsi/tests/test_discovery_firmware.c    |   53 +
+ libiscsi/tests/test_discovery_sendtargets.c |   60 ++
+ libiscsi/tests/test_get_auth.c              |   70 ++
+ libiscsi/tests/test_get_initiator_name.c    |   38 +
+ libiscsi/tests/test_get_network_config.c    |   45 +
+ libiscsi/tests/test_login.c                 |   52 +
+ libiscsi/tests/test_logout.c                |   51 +
+ libiscsi/tests/test_params.c                |  103 ++
+ libiscsi/tests/test_set_auth.c              |   58 ++
+ usr/discovery.c                             |    1 +
+ usr/iscsi_ipc.h                             |    2 +
+ usr/iscsiadm.c                              |    3 +-
+ usr/iscsid.c                                |   10 +-
+ usr/iscsistart.c                            |    3 +-
+ usr/log.c                                   |   65 +-
+ usr/log.h                                   |    9 +-
+ 23 files changed, 3660 insertions(+), 40 deletions(-)
+ create mode 100644 libiscsi/Makefile
+ create mode 100644 libiscsi/libiscsi.c
+ create mode 100644 libiscsi/libiscsi.doxy
+ create mode 100644 libiscsi/libiscsi.h
+ create mode 100644 libiscsi/pylibiscsi.c
+ create mode 100644 libiscsi/setup.py
+ create mode 100644 libiscsi/tests/test_discovery_firmware.c
+ create mode 100644 libiscsi/tests/test_discovery_sendtargets.c
+ create mode 100644 libiscsi/tests/test_get_auth.c
+ create mode 100644 libiscsi/tests/test_get_initiator_name.c
+ create mode 100644 libiscsi/tests/test_get_network_config.c
+ create mode 100644 libiscsi/tests/test_login.c
+ create mode 100644 libiscsi/tests/test_logout.c
+ create mode 100644 libiscsi/tests/test_params.c
+ create mode 100644 libiscsi/tests/test_set_auth.c
+
+diff --git a/Makefile b/Makefile
+index 7bd1e2f..a02cb96 100644
+--- a/Makefile
++++ b/Makefile
+@@ -31,6 +31,7 @@ user: ;
+ 	$(MAKE) -C utils/fwparam_ibft
+ 	$(MAKE) -C usr
+ 	$(MAKE) -C utils
++	$(MAKE) -C libiscsi
+ 	@echo
+ 	@echo "Compilation complete                 Output file"
+ 	@echo "-----------------------------------  ----------------"
+@@ -52,6 +53,7 @@ kernel: force
+ force: ;
+ 
+ clean:
++	$(MAKE) -C libiscsi clean
+ 	$(MAKE) -C utils/sysdeps clean
+ 	$(MAKE) -C utils/fwparam_ibft clean
+ 	$(MAKE) -C utils clean
+diff --git a/libiscsi/Makefile b/libiscsi/Makefile
+new file mode 100644
+index 0000000..a9598fa
+--- /dev/null
++++ b/libiscsi/Makefile
+@@ -0,0 +1,64 @@
 +# This Makefile will work only with GNU make.
 +
 +OSNAME=$(shell uname -s)
@@ -14,14 +82,15 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/Makefile open-iscsi-2.0-870.1/libis
 +TESTS += tests/test_get_network_config tests/test_get_initiator_name
 +TESTS += tests/test_set_auth tests/test_get_auth
 +
++COMMON_SRCS = sysdeps.o
 +# sources shared between iscsid, iscsiadm and iscsistart
-+ISCSI_LIB_SRCS = util.o io.o auth.o login.o log.o md5.o sha1.o iface.o idbm.o sysdeps.o sysfs.o iscsi_sysfs.o
-+FW_PARAM_SRCS = fwparam_ibft.o fw_entry.o prom_lex.o prom_parse.tab.o fwparam_ppc.o fwparam_ibft_sysfs.o
++ISCSI_LIB_SRCS = session_info.o util.o io.o auth.o discovery.o login.o log.o md5.o sha1.o iface.o idbm.o sysfs.o iscsi_sysfs.o iscsi_net_util.o
++FW_PARAM_SRCS = fw_entry.o prom_lex.o prom_parse.tab.o fwparam_ppc.o fwparam_ibft_sysfs.o
 +
 +# sources shared with the userspace utils, note we build these separately
 +# to get PIC versions.
-+USR_OBJS = $(patsubst %.o, usr-objs/%.o, $(ISCSI_LIB_SRCS) strings.o \
-+discovery.o)
++COMMON_OBJS = $(patsubst %.o, common-objs/%.o, $(COMMON_SRCS))
++USR_OBJS = $(patsubst %.o, usr-objs/%.o, $(ISCSI_LIB_SRCS) strings.o)
 +FW_OBJS = $(patsubst %.o, fw-objs/%.o, $(FW_PARAM_SRCS))
 +
 +# Flags for the tests
@@ -32,34 +101,45 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/Makefile open-iscsi-2.0-870.1/libis
 +lib: $(LIB)
 +tests: $(TESTS)
 +
++common-objs/%.o: ../utils/sysdeps/%.c
++	mkdir -p common-objs
++	$(CC) $(CFLAGS) -c $< -o $@
++
 +usr-objs/%.o: ../usr/%.c
 +	mkdir -p usr-objs
 +	$(CC) $(CFLAGS) -c $< -o $@
 +
++libuip-objs/%.o: ../offload/libuip/%.c
++	mkdir -p libuip-objs
++	$(CC) $(CFLAGS) -c $< -o $@
++
 +fw-objs/%.o: ../utils/fwparam_ibft/%.c
 +	mkdir -p fw-objs
 +	$(CC) $(CFLAGS) -c $< -o $@
 +
-+$(LIB): $(USR_OBJS) $(FW_OBJS) libiscsi.o
++$(LIB): $(COMMON_OBJS) $(FW_OBJS) $(USR_OBJS) libiscsi.o
 +	$(CC) $(CFLAGS) -shared -Wl,-soname,$(LIB) $^ -o $@
 +	ln -s -f $(LIB) libiscsi.so
 +
-+$(TESTS): $(USR_OBJS) $(LIB)
++$(TESTS): $(FW_OBJS) $(COMMON_OBJS) $(USR_OBJS) $(LIB)
 +
 +html: libiscsi.h libiscsi.doxy
 +	doxygen libiscsi.doxy
 +
 +clean:
-+	rm -rf *.o usr-objs fw-objs libiscsi.so* .depend *~ html $(TESTS) tests/*~
++	rm -rf *.o common-objs usr-objs fw-objs libuip-objs libiscsi.so* \
++			.depend *~ html $(TESTS) tests/*~
 +
 +depend:
 +	gcc $(CFLAGS) -M `ls *.c` > .depend
 +
 +-include .depend ../usr/.depend
-diff -urN open-iscsi-2.0-870.1.orig/libiscsi/libiscsi.c open-iscsi-2.0-870.1/libiscsi/libiscsi.c
---- open-iscsi-2.0-870.1.orig/libiscsi/libiscsi.c	1970-01-01 01:00:00.000000000 +0100
-+++ open-iscsi-2.0-870.1/libiscsi/libiscsi.c	2009-01-28 14:22:55.000000000 +0100
-@@ -0,0 +1,567 @@
+diff --git a/libiscsi/libiscsi.c b/libiscsi/libiscsi.c
+new file mode 100644
+index 0000000..4324619
+--- /dev/null
++++ b/libiscsi/libiscsi.c
+@@ -0,0 +1,562 @@
 +/*
 + * iSCSI Administration library
 + *
@@ -88,10 +168,11 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/libiscsi.c open-iscsi-2.0-870.1/lib
 +#include <sys/syslog.h>
 +#include "libiscsi.h"
 +#include "idbm.h"
-+#include "iscsiadm.h"
++#include "discovery.h"
 +#include "log.h"
 +#include "sysfs.h"
 +#include "iscsi_sysfs.h"
++#include "session_info.h"
 +#include "util.h"
 +#include "sysdeps.h"
 +#include "iface.h"
@@ -163,12 +244,10 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/libiscsi.c open-iscsi-2.0-870.1/lib
 +	int *nr_found, struct libiscsi_node **found_nodes)
 +{
 +	struct discovery_rec drec;
-+	LIST_HEAD(new_rec_list);
 +	LIST_HEAD(bound_rec_list);
 +	struct node_rec *rec;
 +	int rc = 0, found = 0;
 +
-+	INIT_LIST_HEAD(&new_rec_list);
 +	INIT_LIST_HEAD(&bound_rec_list);
 +
 +	if (nr_found)
@@ -202,12 +281,10 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/libiscsi.c open-iscsi-2.0-870.1/lib
 +		break;
 +	}
 +
-+	CHECK(discovery_sendtargets(&drec, &new_rec_list))
-+	CHECK(idbm_add_discovery(&drec, 1 /* overwrite existing records */))
++	CHECK(idbm_add_discovery(&drec))
 +
-+	/* bind ifaces to node recs so we know what we have */
-+	list_for_each_entry(rec, &new_rec_list, list)
-+		CHECK(idbm_bind_ifaces_to_node(rec, NULL, &bound_rec_list))
++	CHECK(idbm_bind_ifaces_to_nodes(discovery_sendtargets,
++					&drec, NULL, &bound_rec_list))
 +
 +	/* now add/update records */
 +	list_for_each_entry(rec, &bound_rec_list, list) {
@@ -240,8 +317,6 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/libiscsi.c open-iscsi-2.0-870.1/lib
 +
 +leave:
 +	free_rec_list(&bound_rec_list);
-+	free_rec_list(&new_rec_list);
-+
 +	return rc;
 +}
 +
@@ -258,7 +333,7 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/libiscsi.c open-iscsi-2.0-870.1/lib
 +		*found_nodes = NULL;
 +
 +	memset(&fw_entry, 0, sizeof fw_entry);
-+	rc = fw_get_entry(&fw_entry, NULL);
++	rc = fw_get_entry(&fw_entry);
 +	if (rc) {
 +		strcpy(context->error_str, "Could not read fw values.");
 +		return rc;
@@ -597,7 +672,7 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/libiscsi.c open-iscsi-2.0-870.1/lib
 +
 +	memset(config, 0, sizeof *config);
 +	memset(&fw_entry, 0, sizeof fw_entry);
-+	if (fw_get_entry(&fw_entry, NULL))
++	if (fw_get_entry(&fw_entry))
 +		return ENODEV;
 +
 +	config->dhcp = strlen(fw_entry.dhcp) ? 1 : 0;
@@ -619,7 +694,7 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/libiscsi.c open-iscsi-2.0-870.1/lib
 +
 +	memset(initiatorname, 0, LIBISCSI_VALUE_MAXLEN);
 +	memset(&fw_entry, 0, sizeof fw_entry);
-+	if (fw_get_entry(&fw_entry, NULL))
++	if (fw_get_entry(&fw_entry))
 +		return ENODEV;
 +
 +	strncpy(initiatorname, fw_entry.initiatorname,
@@ -627,9 +702,11 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/libiscsi.c open-iscsi-2.0-870.1/lib
 +
 +	return 0;
 +}
-diff -urN open-iscsi-2.0-870.1.orig/libiscsi/libiscsi.doxy open-iscsi-2.0-870.1/libiscsi/libiscsi.doxy
---- open-iscsi-2.0-870.1.orig/libiscsi/libiscsi.doxy	1970-01-01 01:00:00.000000000 +0100
-+++ open-iscsi-2.0-870.1/libiscsi/libiscsi.doxy	2009-01-28 10:26:36.000000000 +0100
+diff --git a/libiscsi/libiscsi.doxy b/libiscsi/libiscsi.doxy
+new file mode 100644
+index 0000000..663770f
+--- /dev/null
++++ b/libiscsi/libiscsi.doxy
 @@ -0,0 +1,1473 @@
 +# Doxyfile 1.5.7.1
 +
@@ -2104,9 +2181,11 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/libiscsi.doxy open-iscsi-2.0-870.1/
 +# used. If set to NO the values of all tags below this one will be ignored.
 +
 +SEARCHENGINE           = NO
-diff -urN open-iscsi-2.0-870.1.orig/libiscsi/libiscsi.h open-iscsi-2.0-870.1/libiscsi/libiscsi.h
---- open-iscsi-2.0-870.1.orig/libiscsi/libiscsi.h	1970-01-01 01:00:00.000000000 +0100
-+++ open-iscsi-2.0-870.1/libiscsi/libiscsi.h	2009-01-28 14:16:19.000000000 +0100
+diff --git a/libiscsi/libiscsi.h b/libiscsi/libiscsi.h
+new file mode 100644
+index 0000000..a7d05a5
+--- /dev/null
++++ b/libiscsi/libiscsi.h
 @@ -0,0 +1,343 @@
 +/*
 + * iSCSI Administration library
@@ -2451,10 +2530,12 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/libiscsi.h open-iscsi-2.0-870.1/lib
 +#endif /* __cplusplus */
 +
 +#endif
-diff -urN open-iscsi-2.0-870.1.orig/libiscsi/pylibiscsi.c open-iscsi-2.0-870.1/libiscsi/pylibiscsi.c
---- open-iscsi-2.0-870.1.orig/libiscsi/pylibiscsi.c	1970-01-01 01:00:00.000000000 +0100
-+++ open-iscsi-2.0-870.1/libiscsi/pylibiscsi.c	2009-01-28 14:49:03.000000000 +0100
-@@ -0,0 +1,615 @@
+diff --git a/libiscsi/pylibiscsi.c b/libiscsi/pylibiscsi.c
+new file mode 100644
+index 0000000..454a26a
+--- /dev/null
++++ b/libiscsi/pylibiscsi.c
+@@ -0,0 +1,624 @@
 +/*
 + * iSCSI Administration library
 + *
@@ -2942,19 +3023,28 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/pylibiscsi.c open-iscsi-2.0-870.1/l
 +	char *kwlist[] = {"address", "port", "authinfo", NULL};
 +	const char *address = NULL;
 +	int i, nr_found, port = 3260;
-+	PyIscsiChapAuthInfo *pyauthinfo = NULL;
++	PyObject *authinfo_arg = NULL;
 +	const struct libiscsi_auth_info *authinfo = NULL;
 +	struct libiscsi_node *found_nodes;
 +	PyObject* found_node_list;
 +
-+	if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|iO!",
++	if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|iO",
 +					kwlist, &address, &port,
-+					&PyIscsiChapAuthInfo_Type,
-+					&pyauthinfo))
++					&authinfo_arg))
 +		return NULL;
 +
-+	if (pyauthinfo)
-+		authinfo = &pyauthinfo->info;
++	if (authinfo_arg) {
++		if (PyObject_IsInstance(authinfo_arg, (PyObject *)
++					       &PyIscsiChapAuthInfo_Type)) {
++			PyIscsiChapAuthInfo *pyauthinfo =
++				(PyIscsiChapAuthInfo *)authinfo_arg;
++			authinfo = &pyauthinfo->info;
++		} else if (authinfo_arg != Py_None) {
++			PyErr_SetString(PyExc_ValueError,
++				"invalid authinfo type");
++			return NULL;
++		}
++	}
 +
 +	if (libiscsi_discover_sendtargets(context, address, port, authinfo,
 +					  &nr_found, &found_nodes)) {
@@ -3070,9 +3160,11 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/pylibiscsi.c open-iscsi-2.0-870.1/l
 +	Py_INCREF(&PyIscsiNode_Type);
 +	PyModule_AddObject(m, "node", (PyObject *) &PyIscsiNode_Type);
 +}
-diff -urN open-iscsi-2.0-870.1.orig/libiscsi/setup.py open-iscsi-2.0-870.1/libiscsi/setup.py
---- open-iscsi-2.0-870.1.orig/libiscsi/setup.py	1970-01-01 01:00:00.000000000 +0100
-+++ open-iscsi-2.0-870.1/libiscsi/setup.py	2009-01-28 10:26:36.000000000 +0100
+diff --git a/libiscsi/setup.py b/libiscsi/setup.py
+new file mode 100644
+index 0000000..bb4329b
+--- /dev/null
++++ b/libiscsi/setup.py
 @@ -0,0 +1,9 @@
 +from distutils.core import setup, Extension
 +
@@ -3083,9 +3175,11 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/setup.py open-iscsi-2.0-870.1/libis
 +
 +setup (name = 'PyIscsi',version = '1.0',
 +       description = 'libiscsi python bindings', ext_modules = [module1])
-diff -urN open-iscsi-2.0-870.1.orig/libiscsi/tests/test_discovery_firmware.c open-iscsi-2.0-870.1/libiscsi/tests/test_discovery_firmware.c
---- open-iscsi-2.0-870.1.orig/libiscsi/tests/test_discovery_firmware.c	1970-01-01 01:00:00.000000000 +0100
-+++ open-iscsi-2.0-870.1/libiscsi/tests/test_discovery_firmware.c	2009-01-28 10:26:36.000000000 +0100
+diff --git a/libiscsi/tests/test_discovery_firmware.c b/libiscsi/tests/test_discovery_firmware.c
+new file mode 100644
+index 0000000..76e852a
+--- /dev/null
++++ b/libiscsi/tests/test_discovery_firmware.c
 @@ -0,0 +1,53 @@
 +/*
 + * iSCSI Administration library
@@ -3140,9 +3234,11 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/tests/test_discovery_firmware.c ope
 +
 +	return rc;
 +}
-diff -urN open-iscsi-2.0-870.1.orig/libiscsi/tests/test_discovery_sendtargets.c open-iscsi-2.0-870.1/libiscsi/tests/test_discovery_sendtargets.c
---- open-iscsi-2.0-870.1.orig/libiscsi/tests/test_discovery_sendtargets.c	1970-01-01 01:00:00.000000000 +0100
-+++ open-iscsi-2.0-870.1/libiscsi/tests/test_discovery_sendtargets.c	2009-01-28 10:26:36.000000000 +0100
+diff --git a/libiscsi/tests/test_discovery_sendtargets.c b/libiscsi/tests/test_discovery_sendtargets.c
+new file mode 100644
+index 0000000..1a3c12e
+--- /dev/null
++++ b/libiscsi/tests/test_discovery_sendtargets.c
 @@ -0,0 +1,60 @@
 +/*
 + * iSCSI Administration library
@@ -3204,9 +3300,11 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/tests/test_discovery_sendtargets.c
 +
 +	return rc;
 +}
-diff -urN open-iscsi-2.0-870.1.orig/libiscsi/tests/test_get_auth.c open-iscsi-2.0-870.1/libiscsi/tests/test_get_auth.c
---- open-iscsi-2.0-870.1.orig/libiscsi/tests/test_get_auth.c	1970-01-01 01:00:00.000000000 +0100
-+++ open-iscsi-2.0-870.1/libiscsi/tests/test_get_auth.c	2009-01-28 14:30:25.000000000 +0100
+diff --git a/libiscsi/tests/test_get_auth.c b/libiscsi/tests/test_get_auth.c
+new file mode 100644
+index 0000000..5e234da
+--- /dev/null
++++ b/libiscsi/tests/test_get_auth.c
 @@ -0,0 +1,70 @@
 +/*
 + * iSCSI Administration library
@@ -3278,9 +3376,11 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/tests/test_get_auth.c open-iscsi-2.
 +
 +	return rc;
 +}
-diff -urN open-iscsi-2.0-870.1.orig/libiscsi/tests/test_get_initiator_name.c open-iscsi-2.0-870.1/libiscsi/tests/test_get_initiator_name.c
---- open-iscsi-2.0-870.1.orig/libiscsi/tests/test_get_initiator_name.c	1970-01-01 01:00:00.000000000 +0100
-+++ open-iscsi-2.0-870.1/libiscsi/tests/test_get_initiator_name.c	2009-01-28 10:26:36.000000000 +0100
+diff --git a/libiscsi/tests/test_get_initiator_name.c b/libiscsi/tests/test_get_initiator_name.c
+new file mode 100644
+index 0000000..997c053
+--- /dev/null
++++ b/libiscsi/tests/test_get_initiator_name.c
 @@ -0,0 +1,38 @@
 +/*
 + * iSCSI Administration library
@@ -3320,9 +3420,11 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/tests/test_get_initiator_name.c ope
 +
 +	return 0;
 +}
-diff -urN open-iscsi-2.0-870.1.orig/libiscsi/tests/test_get_network_config.c open-iscsi-2.0-870.1/libiscsi/tests/test_get_network_config.c
---- open-iscsi-2.0-870.1.orig/libiscsi/tests/test_get_network_config.c	1970-01-01 01:00:00.000000000 +0100
-+++ open-iscsi-2.0-870.1/libiscsi/tests/test_get_network_config.c	2009-01-28 10:26:36.000000000 +0100
+diff --git a/libiscsi/tests/test_get_network_config.c b/libiscsi/tests/test_get_network_config.c
+new file mode 100644
+index 0000000..2dedd61
+--- /dev/null
++++ b/libiscsi/tests/test_get_network_config.c
 @@ -0,0 +1,45 @@
 +/*
 + * iSCSI Administration library
@@ -3369,9 +3471,11 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/tests/test_get_network_config.c ope
 +
 +	return 0;
 +}
-diff -urN open-iscsi-2.0-870.1.orig/libiscsi/tests/test_login.c open-iscsi-2.0-870.1/libiscsi/tests/test_login.c
---- open-iscsi-2.0-870.1.orig/libiscsi/tests/test_login.c	1970-01-01 01:00:00.000000000 +0100
-+++ open-iscsi-2.0-870.1/libiscsi/tests/test_login.c	2009-01-28 14:29:13.000000000 +0100
+diff --git a/libiscsi/tests/test_login.c b/libiscsi/tests/test_login.c
+new file mode 100644
+index 0000000..3eb70d6
+--- /dev/null
++++ b/libiscsi/tests/test_login.c
 @@ -0,0 +1,52 @@
 +/*
 + * iSCSI Administration library
@@ -3425,9 +3529,11 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/tests/test_login.c open-iscsi-2.0-8
 +
 +	return rc;
 +}
-diff -urN open-iscsi-2.0-870.1.orig/libiscsi/tests/test_logout.c open-iscsi-2.0-870.1/libiscsi/tests/test_logout.c
---- open-iscsi-2.0-870.1.orig/libiscsi/tests/test_logout.c	1970-01-01 01:00:00.000000000 +0100
-+++ open-iscsi-2.0-870.1/libiscsi/tests/test_logout.c	2009-01-28 10:26:36.000000000 +0100
+diff --git a/libiscsi/tests/test_logout.c b/libiscsi/tests/test_logout.c
+new file mode 100644
+index 0000000..b734dca
+--- /dev/null
++++ b/libiscsi/tests/test_logout.c
 @@ -0,0 +1,51 @@
 +/*
 + * iSCSI Administration library
@@ -3480,9 +3586,11 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/tests/test_logout.c open-iscsi-2.0-
 +
 +	return rc;
 +}
-diff -urN open-iscsi-2.0-870.1.orig/libiscsi/tests/test_params.c open-iscsi-2.0-870.1/libiscsi/tests/test_params.c
---- open-iscsi-2.0-870.1.orig/libiscsi/tests/test_params.c	1970-01-01 01:00:00.000000000 +0100
-+++ open-iscsi-2.0-870.1/libiscsi/tests/test_params.c	2009-01-28 10:26:36.000000000 +0100
+diff --git a/libiscsi/tests/test_params.c b/libiscsi/tests/test_params.c
+new file mode 100644
+index 0000000..d3223be
+--- /dev/null
++++ b/libiscsi/tests/test_params.c
 @@ -0,0 +1,103 @@
 +/*
 + * iSCSI Administration library
@@ -3587,9 +3695,11 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/tests/test_params.c open-iscsi-2.0-
 +
 +	return rc;
 +}
-diff -urN open-iscsi-2.0-870.1.orig/libiscsi/tests/test_set_auth.c open-iscsi-2.0-870.1/libiscsi/tests/test_set_auth.c
---- open-iscsi-2.0-870.1.orig/libiscsi/tests/test_set_auth.c	1970-01-01 01:00:00.000000000 +0100
-+++ open-iscsi-2.0-870.1/libiscsi/tests/test_set_auth.c	2009-01-28 14:28:38.000000000 +0100
+diff --git a/libiscsi/tests/test_set_auth.c b/libiscsi/tests/test_set_auth.c
+new file mode 100644
+index 0000000..a21f888
+--- /dev/null
++++ b/libiscsi/tests/test_set_auth.c
 @@ -0,0 +1,58 @@
 +/*
 + * iSCSI Administration library
@@ -3649,112 +3759,56 @@ diff -urN open-iscsi-2.0-870.1.orig/libiscsi/tests/test_set_auth.c open-iscsi-2.
 +
 +	return rc;
 +}
-diff -urN open-iscsi-2.0-870.1.orig/usr/idbm.c open-iscsi-2.0-870.1/usr/idbm.c
---- open-iscsi-2.0-870.1.orig/usr/idbm.c	2009-01-27 21:43:15.000000000 +0100
-+++ open-iscsi-2.0-870.1/usr/idbm.c	2009-01-28 13:42:37.000000000 +0100
-@@ -37,6 +37,7 @@
- #include "transport.h"
- #include "iscsi_sysfs.h"
- #include "iface.h"
-+#include "sysdeps.h"
- 
- #define IDBM_HIDE	0    /* Hide parameter when print. */
- #define IDBM_SHOW	1    /* Show parameter when print. */
-@@ -252,7 +253,7 @@
- 	}
- }
- 
--static void
-+void
- idbm_recinfo_node(node_rec_t *r, recinfo_t *ri)
- {
- 	int num = 0, i;
-@@ -545,6 +546,9 @@
- 					    "unknown value format '%s' for "
- 					    "parameter name '%s'",
- 					    line_number, value, name);
-+			} else {
-+				log_error("unknown value format '%s' for "
-+					  "parameter name '%s'", value, name);
- 			}
- 			break;
- 		}
-@@ -553,6 +557,8 @@
- 	return 1;
- 
- updated:
-+	strlcpy((char*)info[i].value, value, VALUE_MAXVAL);
-+
- #define check_password_param(_param) \
- 	if (!passwd_done && !strcmp(#_param, name)) { \
- 		passwd_done = 1; \
-@@ -1179,7 +1185,7 @@
-  * This iterates over the ifaces in use in the nodes dir.
-  * It does not iterate over the ifaces setup in /etc/iscsi/ifaces.
-  */
--static int idbm_for_each_iface(int *found, void *data,
-+int idbm_for_each_iface(int *found, void *data,
- 				idbm_iface_op_fn *fn,
- 				char *targetname, int tpgt, char *ip, int port)
- {
-@@ -1223,6 +1229,7 @@
- 
- 	iface_dirfd = opendir(portal);
- 	if (!iface_dirfd) {
-+		log_error("iface iter could not read dir %s.", portal);
- 		rc = errno;
- 		goto free_portal;
- 	}
-diff -urN open-iscsi-2.0-870.1.orig/usr/idbm.h open-iscsi-2.0-870.1/usr/idbm.h
---- open-iscsi-2.0-870.1.orig/usr/idbm.h	2009-01-27 21:43:16.000000000 +0100
-+++ open-iscsi-2.0-870.1/usr/idbm.h	2009-01-28 10:26:36.000000000 +0100
-@@ -92,6 +92,9 @@
- 	node_rec_t *match_rec;
- 	idbm_iface_op_fn *fn;
+diff --git a/usr/discovery.c b/usr/discovery.c
+index 9deb6f4..04fa6a2 100644
+--- a/usr/discovery.c
++++ b/usr/discovery.c
+@@ -36,6 +36,7 @@
+ #include "types.h"
+ #include "iscsi_proto.h"
+ #include "initiator.h"
++#include "config.h"
+ #include "log.h"
+ #include "idbm.h"
+ #include "iscsi_settings.h"
+diff --git a/usr/iscsi_ipc.h b/usr/iscsi_ipc.h
+index 74ef948..713914f 100644
+--- a/usr/iscsi_ipc.h
++++ b/usr/iscsi_ipc.h
+@@ -111,4 +111,6 @@ struct iscsi_ipc {
+ 	int (*recv_pdu_end) (struct iscsi_conn *conn);
  };
-+extern int idbm_for_each_iface(int *found, void *data,
-+				idbm_iface_op_fn *fn,
-+				char *targetname, int tpgt, char *ip, int port);
- extern int idbm_for_each_portal(int *found, void *data,
- 				idbm_portal_op_fn *fn, char *targetname);
- extern int idbm_for_each_node(int *found, void *data,
-@@ -143,6 +146,7 @@
- extern int idbm_verify_param(recinfo_t *info, char *name);
- extern int idbm_rec_update_param(recinfo_t *info, char *name, char *value,
- 				 int line_number);
-+extern void idbm_recinfo_node(node_rec_t *r, recinfo_t *ri);
- 
- enum {
- 	IDBM_PRINT_TYPE_DISCOVERY,
-diff -urN open-iscsi-2.0-870.1.orig/usr/iscsiadm.c open-iscsi-2.0-870.1/usr/iscsiadm.c
---- open-iscsi-2.0-870.1.orig/usr/iscsiadm.c	2009-01-27 21:43:16.000000000 +0100
-+++ open-iscsi-2.0-870.1/usr/iscsiadm.c	2009-01-28 10:26:36.000000000 +0100
-@@ -2017,9 +2017,8 @@
  
++struct iscsi_ipc *ipc;
++
+ #endif /* ISCSI_IPC_H */
+diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
+index 2f3bfad..a797baf 100644
+--- a/usr/iscsiadm.c
++++ b/usr/iscsiadm.c
+@@ -1722,8 +1722,7 @@ main(int argc, char **argv)
  	umask(0177);
  
--	/* enable stdout logging */
+ 	/* enable stdout logging */
 -	log_daemon = 0;
 -	log_init(program_name, 1024);
-+	/* enable stderr logging */
 +	log_init(program_name, 1024, log_do_log_stderr, NULL);
  	sysfs_init();
  
  	optopt = 0;
-diff -urN open-iscsi-2.0-870.1.orig/usr/iscsid.c open-iscsi-2.0-870.1/usr/iscsid.c
---- open-iscsi-2.0-870.1.orig/usr/iscsid.c	2009-01-27 21:43:16.000000000 +0100
-+++ open-iscsi-2.0-870.1/usr/iscsid.c	2009-01-28 10:26:36.000000000 +0100
-@@ -48,7 +48,8 @@
- 
+diff --git a/usr/iscsid.c b/usr/iscsid.c
+index bfcca6e..ee68f6f 100644
+--- a/usr/iscsid.c
++++ b/usr/iscsid.c
+@@ -52,6 +52,7 @@ struct iscsi_daemon_config *dconfig = &daemon_config;
  static char program_name[] = "iscsid";
  int control_fd, mgmt_ipc_fd;
--static pid_t log_pid;
-+static pid_t log_pid = -1;
+ static pid_t log_pid;
 +static int daemonize = 1;
  
- extern char sysfs_file[];
- 
-@@ -276,7 +277,7 @@
+ static struct option const long_options[] = {
+ 	{"config", required_argument, NULL, 'c'},
+@@ -294,7 +295,7 @@ static void iscsid_exit(void)
  static void iscsid_shutdown(void)
  {
  	log_warning("iscsid shutting down.");
@@ -3763,7 +3817,7 @@ diff -urN open-iscsi-2.0-870.1.orig/usr/iscsid.c open-iscsi-2.0-870.1/usr/iscsid
  		log_debug(1, "daemon stopping");
  		log_close(log_pid);
  		fprintf(stderr, "done done\n");
-@@ -342,7 +343,7 @@
+@@ -360,7 +361,7 @@ int main(int argc, char *argv[])
  			initiatorname_file = optarg;
  			break;
  		case 'f':
@@ -3772,7 +3826,7 @@ diff -urN open-iscsi-2.0-870.1.orig/usr/iscsid.c open-iscsi-2.0-870.1/usr/iscsid
  			break;
  		case 'd':
  			log_level = atoi(optarg);
-@@ -370,7 +371,8 @@
+@@ -388,7 +389,8 @@ int main(int argc, char *argv[])
  	}
  
  	/* initialize logger */
@@ -3782,7 +3836,7 @@ diff -urN open-iscsi-2.0-870.1.orig/usr/iscsid.c open-iscsi-2.0-870.1/usr/iscsid
  	if (log_pid < 0)
  		exit(1);
  
-@@ -402,7 +404,7 @@
+@@ -420,7 +422,7 @@ int main(int argc, char *argv[])
  		exit(1);
  	}
  
@@ -3791,11 +3845,12 @@ diff -urN open-iscsi-2.0-870.1.orig/usr/iscsid.c open-iscsi-2.0-870.1/usr/iscsid
  		char buf[64];
  		int fd;
  
-diff -urN open-iscsi-2.0-870.1.orig/usr/iscsistart.c open-iscsi-2.0-870.1/usr/iscsistart.c
---- open-iscsi-2.0-870.1.orig/usr/iscsistart.c	2009-01-27 21:43:16.000000000 +0100
-+++ open-iscsi-2.0-870.1/usr/iscsistart.c	2009-01-28 10:26:36.000000000 +0100
-@@ -311,8 +311,7 @@
- 	}
+diff --git a/usr/iscsistart.c b/usr/iscsistart.c
+index 2080066..e2e4ce2 100644
+--- a/usr/iscsistart.c
++++ b/usr/iscsistart.c
+@@ -255,8 +255,7 @@ int main(int argc, char *argv[])
+ 	sigaction(SIGINT, &sa_new, &sa_old );
  
  	/* initialize logger */
 -	log_daemon = 0;
@@ -3804,9 +3859,10 @@ diff -urN open-iscsi-2.0-870.1.orig/usr/iscsistart.c open-iscsi-2.0-870.1/usr/is
  
  	sysfs_init();
  	if (iscsi_sysfs_check_class_version())
-diff -urN open-iscsi-2.0-870.1.orig/usr/log.c open-iscsi-2.0-870.1/usr/log.c
---- open-iscsi-2.0-870.1.orig/usr/log.c	2008-11-22 18:06:46.000000000 +0100
-+++ open-iscsi-2.0-870.1/usr/log.c	2009-01-28 10:26:36.000000000 +0100
+diff --git a/usr/log.c b/usr/log.c
+index 908aac1..017cf9d 100644
+--- a/usr/log.c
++++ b/usr/log.c
 @@ -32,10 +32,11 @@
  #endif
  
@@ -3820,7 +3876,7 @@ diff -urN open-iscsi-2.0-870.1.orig/usr/log.c open-iscsi-2.0-870.1/usr/log.c
  
  static void free_logarea (void)
  {
-@@ -258,35 +259,34 @@
+@@ -258,40 +259,39 @@ static void log_syslog (void * buff)
  	syslog(msg->prio, "%s", (char *)&msg->str);
  }
  
@@ -3828,23 +3884,31 @@ diff -urN open-iscsi-2.0-870.1.orig/usr/log.c open-iscsi-2.0-870.1/usr/log.c
 +void log_do_log_daemon(int prio, void *priv, const char *fmt, va_list ap)
  {
 -	if (log_daemon) {
--		la->ops[0].sem_op = -1;
--		if (semop(la->semid, la->ops, 1) < 0) {
--			syslog(LOG_ERR, "semop up failed %d", errno);
+-		struct sembuf ops[1];
++	struct sembuf ops[1];
+ 
+-		ops[0].sem_num = la->ops[0].sem_num;
+-		ops[0].sem_flg = la->ops[0].sem_flg;
++	ops[0].sem_num = la->ops[0].sem_num;
++	ops[0].sem_flg = la->ops[0].sem_flg;
+ 
+-		ops[0].sem_op = -1;
+-		if (semop(la->semid, ops, 1) < 0) {
+-			syslog(LOG_ERR, "semop down failed %d", errno);
 -			return;
 -		}
-+	la->ops[0].sem_op = -1;
-+	if (semop(la->semid, la->ops, 1) < 0) {
-+		syslog(LOG_ERR, "semop up failed %d", errno);
++	ops[0].sem_op = -1;
++	if (semop(la->semid, ops, 1) < 0) {
++		syslog(LOG_ERR, "semop down failed %d", errno);
 +		return;
 +	}
  
 -		log_enqueue(prio, fmt, ap);
 +	log_enqueue(prio, fmt, ap);
  
--		la->ops[0].sem_op = 1;
--		if (semop(la->semid, la->ops, 1) < 0) {
--			syslog(LOG_ERR, "semop down failed");
+-		ops[0].sem_op = 1;
+-		if (semop(la->semid, ops, 1) < 0) {
+-			syslog(LOG_ERR, "semop up failed");
 -			return;
 -		}
 -	} else {
@@ -3853,9 +3917,9 @@ diff -urN open-iscsi-2.0-870.1.orig/usr/log.c open-iscsi-2.0-870.1/usr/log.c
 -		fprintf(stderr, "\n");
 -		fflush(stderr);
 -	}
-+	la->ops[0].sem_op = 1;
-+	if (semop(la->semid, la->ops, 1) < 0)
-+		syslog(LOG_ERR, "semop down failed");
++	ops[0].sem_op = 1;
++	if (semop(la->semid, ops, 1) < 0)
++		syslog(LOG_ERR, "semop up failed");
 +}
 +
 +void log_do_log_stderr(int prio, void *priv, const char *fmt, va_list ap)
@@ -3875,7 +3939,7 @@ diff -urN open-iscsi-2.0-870.1.orig/usr/log.c open-iscsi-2.0-870.1/usr/log.c
  	va_end(ap);
  }
  
-@@ -294,7 +294,7 @@
+@@ -299,7 +299,7 @@ void log_error(const char *fmt, ...)
  {
  	va_list ap;
  	va_start(ap, fmt);
@@ -3884,7 +3948,7 @@ diff -urN open-iscsi-2.0-870.1.orig/usr/log.c open-iscsi-2.0-870.1/usr/log.c
  	va_end(ap);
  }
  
-@@ -303,7 +303,7 @@
+@@ -308,7 +308,7 @@ void log_debug(int level, const char *fmt, ...)
  	if (log_level > level) {
  		va_list ap;
  		va_start(ap, fmt);
@@ -3893,7 +3957,7 @@ diff -urN open-iscsi-2.0-870.1.orig/usr/log.c open-iscsi-2.0-870.1/usr/log.c
  		va_end(ap);
  	}
  }
-@@ -379,19 +379,23 @@
+@@ -389,19 +389,23 @@ static void catch_signal(int signo)
  
  static void __log_close(void)
  {
@@ -3920,7 +3984,7 @@ diff -urN open-iscsi-2.0-870.1.orig/usr/log.c open-iscsi-2.0-870.1/usr/log.c
  		struct sigaction sa_old;
  		struct sigaction sa_new;
  		pid_t pid;
-@@ -437,11 +441,12 @@
+@@ -447,11 +451,12 @@ int log_init(char *program_name, int size)
  
  	return 0;
  }
@@ -3934,9 +3998,10 @@ diff -urN open-iscsi-2.0-870.1.orig/usr/log.c open-iscsi-2.0-870.1/usr/log.c
  		__log_close();
  		return;
  	}
-diff -urN open-iscsi-2.0-870.1.orig/usr/log.h open-iscsi-2.0-870.1/usr/log.h
---- open-iscsi-2.0-870.1.orig/usr/log.h	2008-11-22 18:06:46.000000000 +0100
-+++ open-iscsi-2.0-870.1/usr/log.h	2009-01-28 10:26:36.000000000 +0100
+diff --git a/usr/log.h b/usr/log.h
+index 23b388e..af4019b 100644
+--- a/usr/log.h
++++ b/usr/log.h
 @@ -26,6 +26,7 @@
  #ifndef LOG_H
  #define LOG_H
@@ -3944,8 +4009,8 @@ diff -urN open-iscsi-2.0-870.1.orig/usr/log.h open-iscsi-2.0-870.1/usr/log.h
 +#include <stdarg.h>
  #include "iscsid.h"
  
- #if defined(Linux)
-@@ -41,7 +42,6 @@
+ union semun {
+@@ -39,7 +40,6 @@ union semun {
  #define DEFAULT_AREA_SIZE 16384
  #define MAX_MSG_SIZE 256
  
@@ -3953,7 +4018,7 @@ diff -urN open-iscsi-2.0-870.1.orig/usr/log.h open-iscsi-2.0-870.1/usr/log.h
  extern int log_level;
  
  struct logmsg {
-@@ -67,7 +67,9 @@
+@@ -65,7 +65,9 @@ struct logarea {
  
  struct logarea *la;
  
@@ -3964,7 +4029,7 @@ diff -urN open-iscsi-2.0-870.1.orig/usr/log.h open-iscsi-2.0-870.1/usr/log.h
  extern void log_close (pid_t pid);
  extern void dump_logmsg (void *);
  extern void log_warning(const char *fmt, ...)
-@@ -77,4 +79,7 @@
+@@ -75,4 +77,7 @@ extern void log_error(const char *fmt, ...)
  extern void log_debug(int level, const char *fmt, ...)
  	__attribute__ ((format (printf, 2, 3)));
  
@@ -3972,3 +4037,6 @@ diff -urN open-iscsi-2.0-870.1.orig/usr/log.h open-iscsi-2.0-870.1/usr/log.h
 +extern void log_do_log_stderr(int prio, void *priv, const char *fmt, va_list ap);
 +
  #endif	/* LOG_H */
+-- 
+1.6.5.2
+
diff --git a/iscsi-initiator-utils-uip-mgmt.patch b/iscsi-initiator-utils-uip-mgmt.patch
new file mode 100644
index 0000000..3b7443d
--- /dev/null
+++ b/iscsi-initiator-utils-uip-mgmt.patch
@@ -0,0 +1,377 @@
+diff -Naurp open-iscsi-2.0-871.1.1-bnx2i/usr/initiator.c open-iscsi-2.0-871.1.1-bnx2i.work/usr/initiator.c
+--- open-iscsi-2.0-871.1.1-bnx2i/usr/initiator.c	2010-01-15 02:24:02.000000000 -0600
++++ open-iscsi-2.0-871.1.1-bnx2i.work/usr/initiator.c	2010-01-15 03:46:45.000000000 -0600
+@@ -45,6 +45,7 @@
+ #include "iscsi_sysfs.h"
+ #include "iscsi_settings.h"
+ #include "iface.h"
++#include "host.h"
+ #include "sysdeps.h"
+ 
+ #define ISCSI_CONN_ERR_REOPEN_DELAY	3
+@@ -725,6 +726,38 @@ static int iscsi_conn_connect(struct isc
+ 	return 0;
+ }
+ 
++static int __set_net_config(struct iscsi_transport *t,
++			    iscsi_session_t *session,
++			    struct iface_rec *iface)
++{
++	if (t->template->set_net_config) {
++		/* uip needs the netdev name */
++		struct host_info hinfo;
++		int hostno, rc;
++
++		/* this assumes that the netdev or hw address is going to be
++		   set */
++		hostno = iscsi_sysfs_get_host_no_from_hwinfo(iface, &rc);
++		if (rc) {
++			log_debug(4, "Couldn't get host no.\n");
++			return rc;
++		}
++
++		/* uip needs the netdev name */
++		if (!strlen(iface->netdev)) {
++			memset(&hinfo, 0, sizeof(hinfo));
++			hinfo.host_no = hostno;
++			iscsi_sysfs_get_hostinfo_by_host_no(&hinfo);
++			strcpy(iface->netdev, hinfo.iface.netdev);
++		}
++
++		return t->template->set_net_config(t, iface, session);
++	}
++
++	return 0;
++}
++
++
+ static void
+ __session_conn_reopen(iscsi_conn_t *conn, queue_task_t *qtask, int do_stop,
+ 		      int redirected)
+@@ -766,6 +799,11 @@ __session_conn_reopen(iscsi_conn_t *conn
+ 	if (!redirected)
+ 		session->reopen_cnt++;
+ 
++	/* uIP will needs to be re-triggered on the connection re-open */
++	if (__set_net_config(conn->session->t, conn->session,
++			      &conn->session->nrec.iface) != 0)
++		goto queue_reopen;
++
+ 	if (iscsi_conn_connect(conn, qtask)) {
+ 		delay = ISCSI_CONN_ERR_REOPEN_DELAY;
+ 		goto queue_reopen;
+@@ -2108,6 +2146,10 @@ static int iface_set_param(struct iscsi_
+ 		return EINVAL;
+ 	}
+ 
++	rc = __set_net_config(t, session, iface);
++	if (rc != 0)
++		return rc;
++
+ 	rc = __iscsi_host_set_param(t, session->hostno,
+ 				    ISCSI_HOST_PARAM_IPADDRESS,
+ 				    iface->ipaddress, ISCSI_STRING);
+diff -Naurp open-iscsi-2.0-871.1.1-bnx2i/usr/Makefile open-iscsi-2.0-871.1.1-bnx2i.work/usr/Makefile
+--- open-iscsi-2.0-871.1.1-bnx2i/usr/Makefile	2010-01-15 02:24:02.000000000 -0600
++++ open-iscsi-2.0-871.1.1-bnx2i.work/usr/Makefile	2010-01-15 04:07:30.000000000 -0600
+@@ -41,7 +41,7 @@ ISCSI_LIB_SRCS = util.o io.o auth.o logi
+ 	$(SYSDEPS_SRCS)
+ # core initiator files
+ INITIATOR_SRCS = initiator.o scsi.o actor.o event_poll.o mgmt_ipc.o isns.o \
+-		transport.o cxgb3i.o be2iscsi.o
++		transport.o cxgb3i.o be2iscsi.o uip_mgmt_ipc.o
+ # fw boot files
+ FW_BOOT_SRCS = $(wildcard ../utils/fwparam_ibft/*.o)
+ 
+diff -Naurp open-iscsi-2.0-871.1.1-bnx2i/usr/transport.c open-iscsi-2.0-871.1.1-bnx2i.work/usr/transport.c
+--- open-iscsi-2.0-871.1.1-bnx2i/usr/transport.c	2010-01-15 02:24:02.000000000 -0600
++++ open-iscsi-2.0-871.1.1-bnx2i.work/usr/transport.c	2010-01-15 03:46:45.000000000 -0600
+@@ -25,6 +25,7 @@
+ #include "log.h"
+ #include "util.h"
+ #include "iscsi_sysfs.h"
++#include "uip_mgmt_ipc.h"
+ #include "cxgb3i.h"
+ #include "be2iscsi.h"
+ 
+@@ -58,6 +59,7 @@ struct iscsi_transport_template bnx2i = 
+ 	.ep_connect	= ktransport_ep_connect,
+ 	.ep_poll	= ktransport_ep_poll,
+ 	.ep_disconnect	= ktransport_ep_disconnect,
++	.set_net_config = uip_broadcast_params,
+ };
+ 
+ struct iscsi_transport_template be2iscsi = {
+diff -Naurp open-iscsi-2.0-871.1.1-bnx2i/usr/transport.h open-iscsi-2.0-871.1.1-bnx2i.work/usr/transport.h
+--- open-iscsi-2.0-871.1.1-bnx2i/usr/transport.h	2010-01-15 02:24:02.000000000 -0600
++++ open-iscsi-2.0-871.1.1-bnx2i.work/usr/transport.h	2010-01-15 03:46:45.000000000 -0600
+@@ -35,6 +35,9 @@ struct iscsi_transport_template {
+ 	int (*ep_poll) (struct iscsi_conn *conn, int timeout_ms);
+ 	void (*ep_disconnect) (struct iscsi_conn *conn);
+ 	void (*create_conn) (struct iscsi_conn *conn);
++	int (*set_net_config) (struct iscsi_transport *t,
++			       struct iface_rec *iface,
++			       struct iscsi_session *session);
+ };
+ 
+ /* represents data path provider */
+diff -Naurp open-iscsi-2.0-871.1.1-bnx2i/usr/uip_mgmt_ipc.c open-iscsi-2.0-871.1.1-bnx2i.work/usr/uip_mgmt_ipc.c
+--- open-iscsi-2.0-871.1.1-bnx2i/usr/uip_mgmt_ipc.c	1969-12-31 18:00:00.000000000 -0600
++++ open-iscsi-2.0-871.1.1-bnx2i.work/usr/uip_mgmt_ipc.c	2010-01-15 03:46:45.000000000 -0600
+@@ -0,0 +1,41 @@
++/*
++ * uIP iSCSI Daemon/Admin Management IPC
++ *
++ * 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.
++ */
++
++#include <string.h>
++
++#include "log.h"
++#include "uip_mgmt_ipc.h"
++#include "util.h"
++
++int uip_broadcast_params(struct iscsi_transport *t,
++			 struct iface_rec *iface,
++			 struct iscsi_session *session)
++{
++	struct iscsid_uip_broadcast broadcast;
++
++        log_debug(3, "broadcasting to uip\n");
++
++	memset(&broadcast, 0, sizeof(broadcast));
++
++	broadcast.header.command = ISCSID_UIP_IPC_GET_IFACE;
++	broadcast.header.payload_len = sizeof(*iface);
++
++	memcpy(&broadcast.u.iface_rec, iface, sizeof(*iface));
++
++	return uip_broadcast(&broadcast,
++			     sizeof(iscsid_uip_broadcast_header_t) +
++			     sizeof(*iface));
++}
+diff -Naurp open-iscsi-2.0-871.1.1-bnx2i/usr/uip_mgmt_ipc.h open-iscsi-2.0-871.1.1-bnx2i.work/usr/uip_mgmt_ipc.h
+--- open-iscsi-2.0-871.1.1-bnx2i/usr/uip_mgmt_ipc.h	1969-12-31 18:00:00.000000000 -0600
++++ open-iscsi-2.0-871.1.1-bnx2i.work/usr/uip_mgmt_ipc.h	2010-01-15 03:46:45.000000000 -0600
+@@ -0,0 +1,71 @@
++/*
++ * uIP iSCSI Daemon/Admin Management IPC
++ *
++ * 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 UIP_MGMT_IPC_H
++#define UIP_MGMT_IPC_H
++
++#include "types.h"
++#include "iscsi_if.h"
++#include "config.h"
++#include "mgmt_ipc.h"
++
++#include "initiator.h"
++#include "transport.h"
++
++#define ISCSID_UIP_NAMESPACE	"ISCSID_UIP_ABSTRACT_NAMESPACE"
++
++typedef enum iscsid_uip_cmd {
++	ISCSID_UIP_IPC_UNKNOWN			= 0,
++	ISCSID_UIP_IPC_GET_IFACE		= 1,
++
++        __ISCSID_UIP_IPC_MAX_COMMAND
++} iscsid_uip_cmd_e;
++
++typedef struct iscsid_uip_broadcast_header {
++	iscsid_uip_cmd_e command;
++	uint32_t payload_len;
++} iscsid_uip_broadcast_header_t;
++
++/* IPC Request */
++typedef struct iscsid_uip_broadcast {
++	struct iscsid_uip_broadcast_header header;
++
++	union {
++		/* messages */
++		struct ipc_broadcast_iface_rec {
++			struct iface_rec rec;
++		} iface_rec;
++	} u;
++} iscsid_uip_broadcast_t;
++
++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,
++} iscsid_uip_mgmt_ipc_err_e;
++
++/* IPC Response */
++typedef struct iscsid_uip_mgmt_rsp {
++	iscsid_uip_cmd_e command;
++	iscsid_uip_mgmt_ipc_err_e err;
++} iscsid_uip_rsp_t;
++
++extern int uip_broadcast_params(struct iscsi_transport *t,
++				struct iface_rec *iface,
++				struct iscsi_session *session);
++
++
++#endif /* UIP_MGMT_IPC_H */
+diff -Naurp open-iscsi-2.0-871.1.1-bnx2i/usr/util.c open-iscsi-2.0-871.1.1-bnx2i.work/usr/util.c
+--- open-iscsi-2.0-871.1.1-bnx2i/usr/util.c	2010-01-15 02:24:02.000000000 -0600
++++ open-iscsi-2.0-871.1.1-bnx2i.work/usr/util.c	2010-01-15 04:05:49.000000000 -0600
+@@ -23,6 +23,7 @@
+ #include "idbm.h"
+ #include "iface.h"
+ #include "session_info.h"
++#include "uip_mgmt_ipc.h"
+ 
+ void daemon_init(void)
+ {
+@@ -201,7 +202,8 @@ static void iscsid_startup(void)
+ 
+ #define MAXSLEEP 128
+ 
+-static mgmt_ipc_err_e iscsid_connect(int *fd, int start_iscsid)
++static mgmt_ipc_err_e ipc_connect(int *fd, char *unix_sock_name,
++				  int start_iscsid)
+ {
+ 	int nsec;
+ 	struct sockaddr_un addr;
+@@ -214,8 +216,8 @@ static mgmt_ipc_err_e iscsid_connect(int
+ 
+ 	memset(&addr, 0, sizeof(addr));
+ 	addr.sun_family = AF_LOCAL;
+-	memcpy((char *) &addr.sun_path + 1, ISCSIADM_NAMESPACE,
+-		strlen(ISCSIADM_NAMESPACE));
++	memcpy((char *) &addr.sun_path + 1, unix_sock_name,
++		strlen(unix_sock_name));
+ 	/*
+ 	 * Trying to connect with exponential backoff
+ 	 */
+@@ -243,6 +245,11 @@ static mgmt_ipc_err_e iscsid_connect(int
+ 	return MGMT_IPC_ERR_ISCSID_NOTCONN;
+ }
+ 
++static mgmt_ipc_err_e iscsid_connect(int *fd, int start_iscsid)
++{
++       return ipc_connect(fd, ISCSIADM_NAMESPACE, start_iscsid);
++}
++
+ mgmt_ipc_err_e iscsid_request(int *fd, iscsiadm_req_t *req, int start_iscsid)
+ {
+ 	int err;
+@@ -340,6 +347,72 @@ int iscsid_req_by_sid(iscsiadm_cmd_e cmd
+ 	return iscsid_req_wait(cmd, fd);
+ }
+ 
++static mgmt_ipc_err_e uip_connect(int *fd)
++{
++	return ipc_connect(fd, ISCSID_UIP_NAMESPACE, 0);
++}
++
++int uip_broadcast(void *buf, size_t buf_len)
++{
++	int err;
++	int fd;
++	iscsid_uip_rsp_t rsp;
++	int flags;
++	int count;
++
++	err = uip_connect(&fd);
++	if (err) {
++		log_warning("uIP daemon is not up");
++		return err;
++	}
++
++	/*  Send the data to uIP */
++	if ((err = write(fd, buf, buf_len)) != buf_len) {
++		log_error("got write error (%d/%d), daemon died?",
++			err, errno);
++		close(fd);
++		return -EIO;
++	}
++
++	/*  Set the socket to a non-blocking read, this way if there are
++	 *  problems waiting for uIP, iscsid can bailout early */
++	flags = fcntl(fd, F_GETFL, 0);
++	if (flags == -1)
++	        flags = 0;
++	err = fcntl(fd, F_SETFL, flags | O_NONBLOCK);
++	if(err != 0) {
++		log_error("could not set uip broadcast to non-blocking: %d",
++			  errno);
++		close(fd);
++		return -EIO;
++	}
++
++#define MAX_UIP_BROADCAST_READ_TRIES 3
++	for(count = 0; count < MAX_UIP_BROADCAST_READ_TRIES; count++) {
++		/*  Wait for the response */
++		err = read(fd, &rsp, sizeof(rsp));
++		if (err == sizeof(rsp)) {
++			log_debug(3, "Broadcasted to uIP with length: %ld\n",
++				  buf_len);
++			break;
++		} else if((err == -1) && (errno == EAGAIN)) {
++			usleep(250000);
++			continue;
++		} else {
++			log_error("Could not read response (%d/%d), daemon died?",
++				  err, errno);
++			break;
++		}
++	}
++
++	if(count == MAX_UIP_BROADCAST_READ_TRIES)
++		log_error("Could not broadcast to uIP");
++
++	close(fd);
++
++	return 0;
++}
++
+ void idbm_node_setup_defaults(node_rec_t *rec)
+ {
+ 	int i;
+diff -Naurp open-iscsi-2.0-871.1.1-bnx2i/usr/util.h open-iscsi-2.0-871.1.1-bnx2i.work/usr/util.h
+--- open-iscsi-2.0-871.1.1-bnx2i/usr/util.h	2010-01-15 02:24:02.000000000 -0600
++++ open-iscsi-2.0-871.1.1-bnx2i.work/usr/util.h	2010-01-15 03:46:45.000000000 -0600
+@@ -36,4 +36,7 @@ extern int __iscsi_match_session(struct 
+ extern char *strstrip(char *s);
+ extern char *get_global_string_param(char *pathname, const char *key);
+ 
++extern int uip_broadcast(void *buf, size_t buf_len);
++
++
+ #endif
+diff -Naurp open-iscsi-2.0-871.1.1-bnx2i/utils/iscsi-iname.c open-iscsi-2.0-871.1.1-bnx2i.work/utils/iscsi-iname.c
+--- open-iscsi-2.0-871.1.1-bnx2i/utils/iscsi-iname.c	2010-01-15 03:50:49.000000000 -0600
++++ open-iscsi-2.0-871.1.1-bnx2i.work/utils/iscsi-iname.c	2010-01-15 03:44:23.000000000 -0600
+@@ -73,7 +73,7 @@ main(int argc, char *argv[])
+ 			exit(0);
+ 		}
+ 	} else {
+-		prefix = "iqn.1994-05.com.redhat";
++		prefix = "iqn.1994-05.com.fedora";
+ 	}
+ 
+ 	/* try to feed some entropy from the pool to MD5 in order to get
diff --git a/iscsi-initiator-utils-update-initscripts-and-docs.patch b/iscsi-initiator-utils-update-initscripts-and-docs.patch
index 35518c1..ee10e7c 100644
--- a/iscsi-initiator-utils-update-initscripts-and-docs.patch
+++ b/iscsi-initiator-utils-update-initscripts-and-docs.patch
@@ -1,7 +1,20 @@
-diff -aurp open-iscsi-2.0-870-rc1/etc/iscsid.conf open-iscsi-2.0-870-rc1.work/etc/iscsid.conf
---- open-iscsi-2.0-870-rc1/etc/iscsid.conf	2008-06-30 20:14:03.000000000 -0500
-+++ open-iscsi-2.0-870-rc1.work/etc/iscsid.conf	2008-06-30 21:08:29.000000000 -0500
-@@ -27,8 +27,8 @@
+diff -aurp open-iscsi-2.0-871.1.1-bnx2i/etc/iscsid.conf open-iscsi-2.0-871.1.1-bnx2i.work/etc/iscsid.conf
+--- open-iscsi-2.0-871.1.1-bnx2i/etc/iscsid.conf	2010-01-15 02:24:02.000000000 -0600
++++ open-iscsi-2.0-871.1.1-bnx2i.work/etc/iscsid.conf	2010-01-15 03:42:00.000000000 -0600
+@@ -24,10 +24,10 @@
+ # maintainers.
+ #
+ # Default for Fedora and RHEL. (uncomment to activate).
+-# iscsid.startup = /etc/rc.d/init.d/iscsid force-start
++iscsid.startup = /etc/rc.d/init.d/iscsid force-start
+ # 
+ # Default for upstream open-iscsi scripts (uncomment to activate).
+-iscsid.startup = /sbin/iscsid
++# iscsid.startup = /sbin/iscsid
+ 
+ 
+ #############################
+@@ -43,8 +43,8 @@ iscsid.startup = /sbin/iscsid
  # To request that the iscsi initd scripts startup a session set to "automatic".
  # node.startup = automatic
  #
@@ -12,10 +25,47 @@ diff -aurp open-iscsi-2.0-870-rc1/etc/iscsid.conf open-iscsi-2.0-870-rc1.work/et
  
  # *************
  # CHAP Settings
-diff -aurp open-iscsi-2.0-870-rc1/README open-iscsi-2.0-870-rc1.work/README
---- open-iscsi-2.0-870-rc1/README	2008-06-30 20:14:03.000000000 -0500
-+++ open-iscsi-2.0-870-rc1.work/README	2008-06-30 21:08:29.000000000 -0500
-@@ -78,11 +78,6 @@ the cache sync command will fail.
+@@ -252,29 +252,27 @@ node.conn[0].iscsi.MaxRecvDataSegmentLen
+ discovery.sendtargets.iscsi.MaxRecvDataSegmentLength = 32768
+ 
+ # To allow the targets to control the setting of the digest checking,
+-# with the initiator requesting a preference of enabling the checking, uncomment# one or both of the following lines:
++# with the initiator requesting a preference of enabling the checking, uncomment
++# the following lines (Data digests are not supported and on ppc/ppc64
++# both header and data digests are not supported.):
+ #node.conn[0].iscsi.HeaderDigest = CRC32C,None
+-#node.conn[0].iscsi.DataDigest = CRC32C,None
+ #
+ # To allow the targets to control the setting of the digest checking,
+ # with the initiator requesting a preference of disabling the checking,
+-# uncomment one or both of the following lines:
++# uncomment the following lines:
+ #node.conn[0].iscsi.HeaderDigest = None,CRC32C
+-#node.conn[0].iscsi.DataDigest = None,CRC32C
+ #
+ # To enable CRC32C digest checking for the header and/or data part of
+-# iSCSI PDUs, uncomment one or both of the following lines:
++# iSCSI PDUs, uncomment the following lines:
+ #node.conn[0].iscsi.HeaderDigest = CRC32C
+-#node.conn[0].iscsi.DataDigest = CRC32C
+ #
+ # To disable digest checking for the header and/or data part of
+-# iSCSI PDUs, uncomment one or both of the following lines:
++# iSCSI PDUs, uncomment the following lines:
+ #node.conn[0].iscsi.HeaderDigest = None
+-#node.conn[0].iscsi.DataDigest = None
+ #
+ # The default is to never use DataDigests or HeaderDigests.
+ #
+-
++node.conn[0].iscsi.HeaderDigest = None
+ 
+ #************
+ # Workarounds
+diff -aurp open-iscsi-2.0-871.1.1-bnx2i/README open-iscsi-2.0-871.1.1-bnx2i.work/README
+--- open-iscsi-2.0-871.1.1-bnx2i/README	2010-01-15 02:24:02.000000000 -0600
++++ open-iscsi-2.0-871.1.1-bnx2i.work/README	2010-01-15 03:40:46.000000000 -0600
+@@ -75,11 +75,6 @@ the cache sync command will fail.
  - iscsiadm's -P 3 option will not print out scsi devices.
  - iscsid will not automatically online devices.
  
@@ -27,7 +77,7 @@ diff -aurp open-iscsi-2.0-870-rc1/README open-iscsi-2.0-870-rc1.work/README
  By default the kernel source found at
  /lib/modules/`uname -a`/build
  will be used to compile the open-iscsi modules. To specify a different
-@@ -694,7 +689,7 @@ Red Hat or Fedora:
+@@ -799,7 +794,7 @@ Red Hat or Fedora:
  -----------------
  To start open-iscsi in Red Hat/Fedora you can do:
  
@@ -36,7 +86,7 @@ diff -aurp open-iscsi-2.0-870-rc1/README open-iscsi-2.0-870-rc1.work/README
  
  To get open-iscsi to automatically start at run time you may have to
  run:
-@@ -873,6 +868,8 @@ To login to all the automated nodes, sim
+@@ -978,6 +973,8 @@ To login to all the automated nodes, sim
  e.g /etc/init.d/open-iscsi restart. On your next startup the nodes will
  be logged into autmotically.
  
@@ -45,3 +95,20 @@ diff -aurp open-iscsi-2.0-870-rc1/README open-iscsi-2.0-870-rc1.work/README
  
  8. Advanced Configuration
  =========================
+diff -aurp open-iscsi-2.0-871.1.1-bnx2i/usr/idbm.c open-iscsi-2.0-871.1.1-bnx2i.work/usr/idbm.c
+--- open-iscsi-2.0-871.1.1-bnx2i/usr/idbm.c	2010-01-15 02:24:02.000000000 -0600
++++ open-iscsi-2.0-871.1.1-bnx2i.work/usr/idbm.c	2010-01-15 03:40:46.000000000 -0600
+@@ -336,9 +336,13 @@ idbm_recinfo_node(node_rec_t *r, recinfo
+ 				 IDBM_SHOW, "None", "CRC32C", "CRC32C,None",
+ 				 "None,CRC32C", num, 1);
+ 		sprintf(key, CONN_DATA_DIGEST, i);
++
++#if 0
++We do not support data digests
+ 		__recinfo_int_o4(key, ri, r, conn[i].iscsi.DataDigest, IDBM_SHOW,
+ 				 "None", "CRC32C", "CRC32C,None",
+ 				 "None,CRC32C", num, 1);
++#endif
+ 		sprintf(key, CONN_IFMARKER, i);
+ 		__recinfo_int_o2(key, ri, r, conn[i].iscsi.IFMarker, IDBM_SHOW,
+ 				"No", "Yes", num, 1);
diff --git a/iscsi-initiator-utils-use-red-hat-for-name.patch b/iscsi-initiator-utils-use-red-hat-for-name.patch
index debbceb..c29c77b 100644
--- a/iscsi-initiator-utils-use-red-hat-for-name.patch
+++ b/iscsi-initiator-utils-use-red-hat-for-name.patch
@@ -1,11 +1,12 @@
---- open-iscsi-2.0-865/utils/iscsi-iname.c	2007-02-21 12:20:47.000000000 -0600
-+++ open-iscsi-2.0-865.work/utils/iscsi-iname.c	2007-06-20 12:37:10.000000000 -0500
-@@ -72,7 +72,7 @@ main(int argc, char *argv[])
+diff -aurp open-iscsi-2.0-871.1.1-bnx2i/utils/iscsi-iname.c open-iscsi-2.0-871.1.1-bnx2i.work/utils/iscsi-iname.c
+--- open-iscsi-2.0-871.1.1-bnx2i/utils/iscsi-iname.c	2010-01-15 02:24:02.000000000 -0600
++++ open-iscsi-2.0-871.1.1-bnx2i.work/utils/iscsi-iname.c	2010-01-15 03:44:23.000000000 -0600
+@@ -73,7 +73,7 @@ main(int argc, char *argv[])
  			exit(0);
  		}
  	} else {
 -		prefix = "iqn.2005-03.org.open-iscsi";
-+		prefix = "iqn.1994-05.com.fedora";
++		prefix = "iqn.1994-05.com.redhat";
  	}
  
  	/* try to feed some entropy from the pool to MD5 in order to get
diff --git a/iscsi-initiator-utils-use-var-for-config.patch b/iscsi-initiator-utils-use-var-for-config.patch
index 2091d97..2254574 100644
--- a/iscsi-initiator-utils-use-var-for-config.patch
+++ b/iscsi-initiator-utils-use-var-for-config.patch
@@ -1,16 +1,16 @@
-diff -aurp open-iscsi-2.0-870-rc1/doc/iscsiadm.8 open-iscsi-2.0-870-rc1.work/doc/iscsiadm.8
---- open-iscsi-2.0-870-rc1/doc/iscsiadm.8	2008-06-30 20:14:03.000000000 -0500
-+++ open-iscsi-2.0-870-rc1.work/doc/iscsiadm.8	2008-06-30 21:36:44.000000000 -0500
-@@ -47,7 +47,7 @@ display help text and exit
+diff -aurp open-iscsi-2.0-871.1.1-bnx2i/doc/iscsiadm.8 open-iscsi-2.0-871.1.1-bnx2i.work/doc/iscsiadm.8
+--- open-iscsi-2.0-871.1.1-bnx2i/doc/iscsiadm.8	2010-01-15 02:24:02.000000000 -0600
++++ open-iscsi-2.0-871.1.1-bnx2i.work/doc/iscsiadm.8	2010-01-15 03:43:24.000000000 -0600
+@@ -49,7 +49,7 @@ display help text and exit
  .TP
  \fB\-I\fR, \fB\-\-interface\fI[iface]\fR
  The interface argument specifies the iSCSI interface to use for the operation.
 -iSCSI interfaces (iface) are defined in /etc/iscsi/ifaces. For hardware
 +iSCSI interfaces (iface) are defined in /var/lib/iscsi/ifaces. For hardware
- or the iface config must have the hardware address (iface.hwaddress)
+ iSCSI (qla4xxx) the iface config must have the hardware address
+ (iface.hwaddress = port's MAC address)
  and the driver/transport_name (iface.transport_name). The iface's name is
- then the filename of the iface config. For software iSCSI, the iface config
-@@ -317,10 +317,10 @@ The configuration file read by \fBiscsid
+@@ -320,10 +320,10 @@ The configuration file read by \fBiscsid
  The file containing the iSCSI InitiatorName and InitiatorAlias read by
  \fBiscsid\fR and \fBiscsiadm\fR on startup.
  .TP
@@ -23,10 +23,10 @@ diff -aurp open-iscsi-2.0-870-rc1/doc/iscsiadm.8 open-iscsi-2.0-870-rc1.work/doc
  This directory contains the portals.
  
  .SH "SEE ALSO"
-diff -aurp open-iscsi-2.0-870-rc1/README open-iscsi-2.0-870-rc1.work/README
---- open-iscsi-2.0-870-rc1/README	2008-06-30 21:37:05.000000000 -0500
-+++ open-iscsi-2.0-870-rc1.work/README	2008-06-30 21:36:44.000000000 -0500
-@@ -148,10 +148,10 @@ available on all Linux installations.
+diff -aurp open-iscsi-2.0-871.1.1-bnx2i/README open-iscsi-2.0-871.1.1-bnx2i.work/README
+--- open-iscsi-2.0-871.1.1-bnx2i/README	2010-01-15 03:43:42.000000000 -0600
++++ open-iscsi-2.0-871.1.1-bnx2i.work/README	2010-01-15 03:43:24.000000000 -0600
+@@ -145,10 +145,10 @@ available on all Linux installations.
  
  The database contains two tables:
  
@@ -40,24 +40,24 @@ diff -aurp open-iscsi-2.0-870-rc1/README open-iscsi-2.0-870-rc1.work/README
  
  The iscsiadm utility is a command-line tool to manage (update, delete,
  insert, query) the persistent database.
-@@ -327,7 +327,7 @@ a scsi_host per HBA port).
+@@ -349,7 +349,7 @@ a scsi_host per HBA port).
  To manage both types of initiator stacks, iscsiadm uses the interface (iface)
  structure. For each HBA port or for software iscsi for each network
  device (ethX) or NIC, that you wish to bind sessions to you must create
 -a iface config /etc/iscsi/ifaces.
 +a iface config /var/lib/iscsi/ifaces.
  
- When you run iscsiadm the first time a hardware iscsi driver like qla4xxx is
- loaded, iscsiadm will create default iface configs for you. The config created
-@@ -340,29 +340,29 @@ Running:
- iface0 qla4xxx,00:c0:dd:08:63:e8,default
- iface1 qla4xxx,00:c0:dd:08:63:ea,default
+ Running:
+ 
+@@ -357,29 +357,29 @@ Running:
+ iface0 qla4xxx,00:c0:dd:08:63:e8,20.15.0.7,default,iqn.2005-06.com.redhat:madmax
+ iface1 qla4xxx,00:c0:dd:08:63:ea,20.15.0.9,default,iqn.2005-06.com.redhat:madmax
  
 -Will report iface configurations that are setup in /etc/iscsi/ifaces.
 +Will report iface configurations that are setup in /var/lib/iscsi/ifaces.
  The format is:
  
- iface_name transport_name,hwaddress,net_ifacename
+ iface_name transport_name,hwaddress,ipaddress,net_ifacename,initiatorname
  
  For software iscsi, you can create the iface configs by hand, but it is
  reccomended that you use iscsiadm's iface mode. There is a iface.example in
@@ -84,16 +84,34 @@ diff -aurp open-iscsi-2.0-870-rc1/README open-iscsi-2.0-870-rc1.work/README
  
  iface.transport_name = tcp
  iface.hwaddress = 00:C0:DD:08:63:E7
-@@ -386,7 +386,7 @@ but you have not logged in then, iscsiad
- all existing bindings.
+@@ -428,7 +428,7 @@ iser iser,<empty>,<empty>,<empty>,<empty
+ cxgb3i.00:07:43:05:97:07 cxgb3i,00:07:43:05:97:07,<empty>,<empty>,<empty>
+ 
+ 
+-Will report iface configurations that are setup in /etc/iscsi/ifaces.
++Will report iface configurations that are setup in /var/lib/iscsi/ifaces.
+ The format is:
+ 
+ iface_name transport_name,hwaddress,ipaddress,net_ifacename,initiatorname
+@@ -444,7 +444,7 @@ default one in /etc/iscsi/initiatorname.
+ 
+ 
+ 
+-To display these values in a more friendly run:
++To display these values in a more friendly way run:
+ 
+ iscsiadm -m iface -I cxgb3i.00:07:43:05:97:07
+ # BEGIN RECORD 2.0-871
+@@ -482,7 +482,7 @@ need a seperate network connection to th
+ *This will be fixed in the next version of open-iscsi*
  
- When you then run iscsiadm to do discovery, it will check for interfaces
--in /etc/iscsi/ifaces and bind the portals that are discovered so that
-+in /var/lib/iscsi/ifaces and bind the portals that are discovered so that
- they will be logged in through each iface. This behavior can also be overriden
- by passing in the interfaces you want to use. For example if you had defined
- two interface but only wanted to use one you can use the
-@@ -400,7 +400,7 @@ we do not bind a session to a iface, the
+ For compatibility reasons, when you run iscsiadm to do discovery, it
+-will check for interfaces in /etc/iscsi/iscsi/ifaces that are using
++will check for interfaces in /var/lib/iscsi/ifaces that are using
+ tcp for the iface.transport and it will bind the portals that are discovered
+ so that they will be logged in through those ifaces. This behavior can also
+ be overriden by passing in the interfaces you want to use. For the case
+@@ -500,7 +500,7 @@ we do not bind a session to a iface, the
  
  iscsiadm -m discovery -t st -p ip:port -I default -P 1
  
@@ -102,7 +120,7 @@ diff -aurp open-iscsi-2.0-870-rc1/README open-iscsi-2.0-870-rc1.work/README
  not pass anything into iscsiadm, running iscsiadm will do the default
  behavior, where we allow the network subsystem to decide which
  device to use.
-@@ -435,7 +435,7 @@ iscsiadm -m node -p ip:port -I iface0 --
+@@ -540,7 +540,7 @@ To now log into targets it is the same a
  
  	    ./iscsiadm -m discovery -t sendtargets -p 192.168.1.1:3260
  
@@ -111,7 +129,7 @@ diff -aurp open-iscsi-2.0-870-rc1/README open-iscsi-2.0-870-rc1.work/README
  	using software iscsi. If any are found then nodes found during
  	discovery will be setup so that they can logged in through
  	those interfaces.
-@@ -483,7 +483,7 @@ iscsiadm -m node -p ip:port -I iface0 --
+@@ -588,7 +588,7 @@ To now log into targets it is the same a
  	existing portals.
  
    - SendTargets iSCSI Discovery with a specific interface. If you
@@ -120,7 +138,7 @@ diff -aurp open-iscsi-2.0-870-rc1/README open-iscsi-2.0-870-rc1.work/README
  	then you can pass them in during discovery:
  
  	     ./iscsiadm -m discovery -t sendtargets -p 192.168.1.1:3260 \
-@@ -768,8 +768,8 @@ where targetname is the name of the targ
+@@ -873,8 +873,8 @@ where targetname is the name of the targ
  and port of the portal. tpgt, is the portal group tag of
  the portal, and is not used in iscsiadm commands except for static
  record creation. And iface name is the name of the iscsi interface
@@ -131,10 +149,10 @@ diff -aurp open-iscsi-2.0-870-rc1/README open-iscsi-2.0-870-rc1.work/README
  Default here is iscsi_tcp/tcp to be used over which ever NIC the
  network layer decides is best.
  
-diff -aurp open-iscsi-2.0-870-rc1/usr/idbm.c open-iscsi-2.0-870-rc1.work/usr/idbm.c
---- open-iscsi-2.0-870-rc1/usr/idbm.c	2008-06-30 20:14:03.000000000 -0500
-+++ open-iscsi-2.0-870-rc1.work/usr/idbm.c	2008-06-30 21:36:44.000000000 -0500
-@@ -2137,9 +2137,9 @@ free_info:
+diff -aurp open-iscsi-2.0-871.1.1-bnx2i/usr/idbm.c open-iscsi-2.0-871.1.1-bnx2i.work/usr/idbm.c
+--- open-iscsi-2.0-871.1.1-bnx2i/usr/idbm.c	2010-01-15 03:43:42.000000000 -0600
++++ open-iscsi-2.0-871.1.1-bnx2i.work/usr/idbm.c	2010-01-15 03:43:24.000000000 -0600
+@@ -2139,9 +2139,9 @@ free_info:
  int idbm_init(idbm_get_config_file_fn *fn)
  {
  	/* make sure root db dir is there */
@@ -147,10 +165,10 @@ diff -aurp open-iscsi-2.0-870-rc1/usr/idbm.c open-iscsi-2.0-870-rc1.work/usr/idb
  				   errno);
  			return errno;
  		}
-diff -aurp open-iscsi-2.0-870-rc1/usr/idbm.h open-iscsi-2.0-870-rc1.work/usr/idbm.h
---- open-iscsi-2.0-870-rc1/usr/idbm.h	2008-06-30 20:14:03.000000000 -0500
-+++ open-iscsi-2.0-870-rc1.work/usr/idbm.h	2008-06-30 21:36:58.000000000 -0500
-@@ -26,11 +26,12 @@
+diff -aurp open-iscsi-2.0-871.1.1-bnx2i/usr/idbm.h open-iscsi-2.0-871.1.1-bnx2i.work/usr/idbm.h
+--- open-iscsi-2.0-871.1.1-bnx2i/usr/idbm.h	2010-01-15 02:24:02.000000000 -0600
++++ open-iscsi-2.0-871.1.1-bnx2i.work/usr/idbm.h	2010-01-15 03:43:24.000000000 -0600
+@@ -26,12 +26,15 @@
  #include "initiator.h"
  #include "config.h"
  
@@ -158,25 +176,31 @@ diff -aurp open-iscsi-2.0-870-rc1/usr/idbm.h open-iscsi-2.0-870-rc1.work/usr/idb
 -#define SLP_CONFIG_DIR		ISCSI_CONFIG_ROOT"slp"
 -#define ISNS_CONFIG_DIR		ISCSI_CONFIG_ROOT"isns"
 -#define STATIC_CONFIG_DIR	ISCSI_CONFIG_ROOT"static"
+-#define FW_CONFIG_DIR		ISCSI_CONFIG_ROOT"fw"
 -#define ST_CONFIG_DIR		ISCSI_CONFIG_ROOT"send_targets"
 +#define ISCSIVAR		"/var/lib/iscsi/"
++
 +#define NODE_CONFIG_DIR		ISCSIVAR"nodes"
 +#define SLP_CONFIG_DIR		ISCSIVAR"slp"
 +#define ISNS_CONFIG_DIR		ISCSIVAR"isns"
 +#define STATIC_CONFIG_DIR	ISCSIVAR"static"
 +#define ST_CONFIG_DIR		ISCSIVAR"send_targets"
++#define FW_CONFIG_DIR		ISCSIVAR"fw"
++
  #define ST_CONFIG_NAME		"st_config"
  
  #define TYPE_INT	0
-diff -aurp open-iscsi-2.0-870-rc1/usr/iface.h open-iscsi-2.0-870-rc1.work/usr/iface.h
---- open-iscsi-2.0-870-rc1/usr/iface.h	2008-06-30 20:14:03.000000000 -0500
-+++ open-iscsi-2.0-870-rc1.work/usr/iface.h	2008-06-30 21:36:44.000000000 -0500
-@@ -20,7 +20,7 @@
+diff -aurp open-iscsi-2.0-871.1.1-bnx2i/usr/iface.h open-iscsi-2.0-871.1.1-bnx2i.work/usr/iface.h
+--- open-iscsi-2.0-871.1.1-bnx2i/usr/iface.h	2010-01-15 02:24:02.000000000 -0600
++++ open-iscsi-2.0-871.1.1-bnx2i.work/usr/iface.h	2010-01-15 03:43:24.000000000 -0600
+@@ -20,7 +20,9 @@
  #ifndef ISCSI_IFACE_H
  #define ISCSI_IFACE_H
  
 -#define IFACE_CONFIG_DIR	ISCSI_CONFIG_ROOT"ifaces"
-+#define IFACE_CONFIG_DIR	"/var/lib/iscsi/ifaces"
++#include "idbm.h"
++
++#define IFACE_CONFIG_DIR	ISCSIVAR"ifaces"
  
  struct iface_rec;
  struct list_head;
diff --git a/iscsi-initiator-utils.spec b/iscsi-initiator-utils.spec
index 26cb964..b42abe2 100644
--- a/iscsi-initiator-utils.spec
+++ b/iscsi-initiator-utils.spec
@@ -2,24 +2,18 @@
 
 Summary: iSCSI daemon and utility programs
 Name: iscsi-initiator-utils
-Version: 6.2.0.870
-Release: 10%{?dist}.1
-Source0: http://www.open-iscsi.org/bits/open-iscsi-2.0-870.1.tar.gz
+Version: 6.2.0.871.1.1
+Release: 1%{?dist}
+Source0: http://people.redhat.com/mchristi/iscsi/rhel6.0/source/open-iscsi-2.0-871.1.1-bnx2i.tar.gz
 Source1: iscsid.init
 Source2: iscsidevs.init
 Source3: 04-iscsi
 Patch0: iscsi-initiator-utils-update-initscripts-and-docs.patch
 Patch1: iscsi-initiator-utils-use-var-for-config.patch
 Patch2: iscsi-initiator-utils-use-red-hat-for-name.patch
-Patch3: iscsi-initiator-utils-ibft-sysfs.patch
-Patch4: iscsi-initiator-utils-print-ibft-net-info.patch
-Patch5: iscsi-initiator-utils-only-root-use.patch
-Patch6: iscsi-initiator-utils-start-iscsid.patch
-Patch7: open-iscsi-2.0-870.1-add-libiscsi.patch
-Patch8: open-iscsi-2.0-870.1-no-exit.patch
-Patch9: open-iscsi-2.0-870.1-ibft-newer-kernel.patch
-Patch10: open-iscsi-2.0-870.1-485217.patch
-Patch11: open-iscsi-2.0-870.1-fwparam-ppc-crash.patch
+Patch3: iscsi-initiator-utils-add-libiscsi.patch
+Patch4: iscsi-initiator-utils-uip-mgmt.patch
+
 
 Group: System Environment/Daemons
 License: GPLv2+
@@ -28,6 +22,7 @@ Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: openssl-devel flex bison python-devel doxygen glibc-static
 Requires(post): chkconfig
 Requires(preun): chkconfig /sbin/service
+ExcludeArch: s390 s390x
 
 %description
 The iscsi package provides the server daemon for the iSCSI protocol,
@@ -45,26 +40,25 @@ The %{name}-devel package contains libraries and header files for
 developing applications that use %{name}.
 
 %prep
-%setup -q -n open-iscsi-2.0-870.1
+%setup -q -n open-iscsi-2.0-871.1.1-bnx2i
 %patch0 -p1 -b .update-initscripts-and-docs
 %patch1 -p1 -b .use-var-for-config
 %patch2 -p1 -b .use-red-hat-for-name
-%patch3 -p1 -b .ibft-sysfs
-%patch4 -p1 -b .print-ibft-net-info
-%patch5 -p1 -b .only-root
-%patch6 -p1 -b .start-iscsid
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
-
+%patch3 -p1 -b .add-libiscsi
+%patch4 -p1 -b .uip-mgmt
 
 %build
+make OPTFLAGS="%{optflags}" -C utils/sysdeps
 make OPTFLAGS="%{optflags}" -C utils/fwparam_ibft
 make OPTFLAGS="%{optflags}" -C usr
 make OPTFLAGS="%{optflags}" -C utils
 make OPTFLAGS="%{optflags}" -C libiscsi
+
+cd brcm_iscsi_uio
+./configure
+make OPTFLAGS="%{optflags}"
+cd ..
+
 pushd libiscsi
 python setup.py build
 popd
@@ -91,8 +85,12 @@ mkdir -p $RPM_BUILD_ROOT%{python_sitearch}
 
 
 install -p -m 755 usr/iscsid usr/iscsiadm utils/iscsi-iname usr/iscsistart $RPM_BUILD_ROOT/sbin
+install -m 755 brcm_iscsi_uio/src/unix/brcm_iscsiuio $RPM_BUILD_ROOT/sbin
 install -p -m 644 doc/iscsiadm.8 $RPM_BUILD_ROOT/%{_mandir}/man8
 install -p -m 644 doc/iscsid.8 $RPM_BUILD_ROOT/%{_mandir}/man8
+install -p -m 644 doc/iscsistart.8 $RPM_BUILD_ROOT/%{_mandir}/man8
+install -p -m 644 doc/iscsi-iname.8 $RPM_BUILD_ROOT/%{_mandir}/man8
+install -p -m 644 brcm_iscsi_uio/docs/brcm_iscsiuio.8 $RPM_BUILD_ROOT/%{_mandir}/man8
 install -p -m 644 etc/iscsid.conf $RPM_BUILD_ROOT%{_sysconfdir}/iscsi
 
 install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/iscsid
@@ -137,6 +135,7 @@ fi
 %files
 %defattr(-,root,root)
 %doc README
+%dir /etc/iscsi
 %dir %{_var}/lib/iscsi
 %dir %{_var}/lib/iscsi/nodes
 %dir %{_var}/lib/iscsi/isns
@@ -161,6 +160,11 @@ fi
 %{_includedir}/libiscsi.h
 
 %changelog
+* Fri Jan 25 2010 Mike Christie <mchristi at redhat.com> 6.2.0.871.1.1-1
+- Sync to upstream
+- 529324 Add iscsi-iname and iscsistart man page
+- 463582 OF/iBFT support
+
 * Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 6.2.0.870-10.1
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 
diff --git a/iscsid.init b/iscsid.init
index 035faee..5de8ea4 100755
--- a/iscsid.init
+++ b/iscsid.init
@@ -37,6 +37,9 @@ force_start() {
     echo -n $"Starting $prog: "
     modprobe -q iscsi_tcp
     modprobe -q ib_iser
+    modprobe -q cxgb3i
+    modprobe -q bnx2i
+    daemon brcm_iscsiuio
     daemon $prog
     retval=$?
     echo
diff --git a/sources b/sources
index 4d9c3cb..5f4fab0 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-3b7e273ad2696899df2b8e5622fdeb2c  open-iscsi-2.0-870.1.tar.gz
+1ca7440f9c2b0d8757ce6e2382f824c7  open-iscsi-2.0-871.1.1-bnx2i.tar.gz


More information about the scm-commits mailing list