tag 523374 fixed-upstream patch
thanks
This is fixed upstream:
http://svn.berlios.de/wsvn/iscsitarget/?op=comp&compare[]=...@210&compare[]=...@211
For convenience, the patch is attached here.
Mike
diff --git a/Makefile b/Makefile
index 753ce5d..bdccea9 100644
--- a/Makefile
+++ b/Makefile
@@ -51,6 +51,11 @@ kver_lk = $(shell [ `echo $(KVER) | egrep $(1)` ] && echo 1
|| echo 0)
# base first the earlier patch sets will not need to be modified.
#
+# Compatibility patch for kernels <= 2.6.28
+ifeq ($(call kver_le,2,6,28),1)
+ PATCHES := $(PATCHES) compat-2.6.28.patch
+endif
+
# Compatibility patch for kernels >= 2.6.25 and <= 2.6.27
ifeq ($(call kver_le,2,6,27),1)
PATCHES := $(PATCHES) compat-2.6.25-2.6.27.patch
diff --git a/kernel/conn.c b/kernel/conn.c
index f96e2b6..360a7a0 100644
--- a/kernel/conn.c
+++ b/kernel/conn.c
@@ -46,9 +46,8 @@ void conn_info_show(struct seq_file *seq, struct
iscsi_session *session)
"%u.%u.%u.%u", NIPQUAD(inet_sk(sk)->daddr));
break;
case AF_INET6:
- snprintf(buf, sizeof(buf),
- "[%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]",
- NIP6(inet6_sk(sk)->daddr));
+ snprintf(buf, sizeof(buf), "[%pI6]",
+ &inet6_sk(sk)->daddr);
break;
default:
break;
diff --git a/patches/compat-2.6.28.patch b/patches/compat-2.6.28.patch
new file mode 100644
index 0000000..3f8ff32
--- /dev/null
+++ b/patches/compat-2.6.28.patch
@@ -0,0 +1,16 @@
+diff --git a/kernel/conn.c b/kernel/conn.c
+index 09b4c0c..a5c0228 100644
+--- a/kernel/conn.c
++++ b/kernel/conn.c
+@@ -46,8 +46,9 @@ void conn_info_show(struct seq_file *seq, struct
iscsi_session *session)
+ "%u.%u.%u.%u", NIPQUAD(inet_sk(sk)->daddr));
+ break;
+ case AF_INET6:
+- snprintf(buf, sizeof(buf), "[%pI6]",
+- &inet6_sk(sk)->daddr);
++ snprintf(buf, sizeof(buf),
++ "[%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]",
++ NIP6(inet6_sk(sk)->daddr));
+ break;
+ default:
+ break;