target/iscsi: Fix np_ip bracket issue by removing np_ip
authorAndy Grover <agrover@redhat.com>
Mon, 24 Aug 2015 17:26:03 +0000 (10:26 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Thu, 27 Aug 2015 06:27:09 +0000 (23:27 -0700)
commit76c28f1fcfeb42b47f798fe498351ee1d60086ae
tree14e0a895f308f1bbf90075b080948e942320647c
parent109e2381749c1cfd94a0d22b2b54142539024973
target/iscsi: Fix np_ip bracket issue by removing np_ip

Revert commit 1997e6259, which causes double brackets on ipv6
inaddr_any addresses.

Since we have np_sockaddr, if we need a textual representation we can
use "%pISc".

Change iscsit_add_network_portal() and iscsit_add_np() signatures to remove
*ip_str parameter.

Fix and extend some comments earlier in the function.

Tested to work for :: and ::1 via iscsiadm, previously :: failed, see
https://bugzilla.redhat.com/show_bug.cgi?id=1249107 .

CC: stable@vger.kernel.org
Signed-off-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target.c
drivers/target/iscsi/iscsi_target.h
drivers/target/iscsi/iscsi_target_configfs.c
drivers/target/iscsi/iscsi_target_login.c
drivers/target/iscsi/iscsi_target_tpg.c
drivers/target/iscsi/iscsi_target_tpg.h
include/target/iscsi/iscsi_target_core.h