Index: iscsitarget/trunk/kernel/conn.c =================================================================== --- iscsitarget.orig/trunk/kernel/conn.c +++ iscsitarget/trunk/kernel/conn.c @@ -38,13 +38,25 @@ void conn_info_show(struct seq_file *seq struct iscsi_conn *conn; struct sock *sk; char buf[64]; + char d_buf[64]; + d_buf[0] = '\0'; + /* + * Please note that the d_buf addition is in conflict with + * patches/compat-2.6.28.patch IPv6 and hence only + * applies to IPv4. This patch is to allow iscsi-portal to + * see the destination connection endpoints of sessions. + * The patch compat-2.6.32 had to be disabled as it cannot + * be patched in due to the additional snprintf. + */ list_for_each_entry(conn, &session->conn_list, list) { sk = conn->sock->sk; switch (sk->sk_family) { case AF_INET: snprintf(buf, sizeof(buf), - "%pI4", inet_sk(sk)->inet_daddr); + "%u.%u.%u.%u", NIPQUAD(inet_sk(sk)->daddr)); + snprintf(d_buf, sizeof(d_buf), + "%u.%u.%u.%u", NIPQUAD(inet_sk(sk)->saddr)); break; case AF_INET6: snprintf(buf, sizeof(buf), "[%pI6]", @@ -53,7 +65,7 @@ void conn_info_show(struct seq_file *seq default: break; } - seq_printf(seq, "\t\tcid:%u ip:%s ", conn->cid, buf); + seq_printf(seq, "\t\tcid:%u s_ip:%s d_ip:%s ", conn->cid, buf, d_buf); print_conn_state(buf, sizeof(buf), conn->state); seq_printf(seq, "state:%s ", buf); print_digest_state(buf, sizeof(buf), conn->hdigest_type); Index: iscsitarget/trunk/Makefile =================================================================== --- iscsitarget.orig/trunk/Makefile +++ iscsitarget/trunk/Makefile @@ -56,15 +56,21 @@ kver_lk = $(shell [ `echo $(KVER) | egre # base first the earlier patch sets will not need to be modified. # +# +# Currently 2.6.32 and 2.6.32-35 is changed by the session patch, if that kernel +# version in the future makes other changes we might have to enable this +# here again and then patch the patch! +# + # Compatibility patch for kernels > 2.6.32 <= 2.6.35 -ifeq ($(call kver_le,2,6,35),1) - PATCHES := $(PATCHES) compat-2.6.33-2.6.35.patch -endif +#ifeq ($(call kver_le,2,6,35),1) +# PATCHES := $(PATCHES) compat-2.6.33-2.6.35.patch +#endif # Compatibility patch for kernels <= 2.6.32 -ifeq ($(call kver_le,2,6,32),1) - PATCHES := $(PATCHES) compat-2.6.32.patch -endif +#ifeq ($(call kver_le,2,6,32),1) +# PATCHES := $(PATCHES) compat-2.6.32.patch +#endif # Compatibility patch for kernels <= 2.6.31 ifeq ($(call kver_le,2,6,31),1)