[Pkg-iscsi-maintainers] [SCM] Debian Open-iSCSI Packaging branch, upstream-mnc, updated. 2.0-872-193-gde2c0e7

Mike Christie michaelc at cs.wisc.edu
Sat Apr 7 15:43:57 UTC 2012


The following commit has been merged in the upstream-mnc branch:
commit 36d20a2032ec45ce82b086841d8810d8c7a78428
Author: Mike Christie <michaelc at cs.wisc.edu>
Date:   Wed Oct 12 01:00:31 2011 -0500

    iscsi tools: fix ipv6 ibft/firmware boot
    
    The address buffers are too short for many ipv6 addresses
    and if ibft/firmware gives us a hostname. As a result iscsistart
    and iscsiadm were printing/getting a truncated address which
    would cause login and network startup to fail.

diff --git a/include/fw_context.h b/include/fw_context.h
index 770b41a..1640859 100644
--- a/include/fw_context.h
+++ b/include/fw_context.h
@@ -21,6 +21,7 @@
 #ifndef FWPARAM_CONTEXT_H_
 #define FWPARAM_CONTEXT_H_
 
+#include <netdb.h>
 #include <net/if.h>
 
 #include "iscsi_proto.h"
@@ -33,7 +34,7 @@ struct boot_context {
 	/* target settings */
 	int target_port;
 	char targetname[TARGET_NAME_MAXLEN + 1];
-	char target_ipaddr[32];
+	char target_ipaddr[NI_MAXHOST];
 	char chap_name[AUTH_STR_MAX_LEN];
 	char chap_password[AUTH_STR_MAX_LEN];
 	char chap_name_in[AUTH_STR_MAX_LEN];
@@ -44,14 +45,14 @@ struct boot_context {
 	char initiatorname[TARGET_NAME_MAXLEN + 1];
 
 	/* network settings */
-	char dhcp[18];
+	char dhcp[NI_MAXHOST];
 	char iface[IF_NAMESIZE];
 	char mac[18];
-	char ipaddr[18];
-	char gateway[18];
-	char primary_dns[18];
-	char secondary_dns[18];
-	char mask[18];
+	char ipaddr[NI_MAXHOST];
+	char gateway[NI_MAXHOST];
+	char primary_dns[NI_MAXHOST];
+	char secondary_dns[NI_MAXHOST];
+	char mask[NI_MAXHOST];
 	char lun[17];
 	char vlan[15];
 
diff --git a/utils/fwparam_ibft/Makefile b/utils/fwparam_ibft/Makefile
index ca07b76..c72bb7f 100644
--- a/utils/fwparam_ibft/Makefile
+++ b/utils/fwparam_ibft/Makefile
@@ -28,7 +28,7 @@ CLEANFILES = $(OBJS) *.output *~
 
 OPTFLAGS ?= -O2 -g -fPIC
 WARNFLAGS ?= -Wall -Wstrict-prototypes
-CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -I../../include -I../../usr
+CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -I../../include -I../../usr -D_GNU_SOURCE
 
 all: $(OBJS)
 

-- 
Debian Open-iSCSI Packaging



More information about the Pkg-iscsi-maintainers mailing list