[SCSI] iscsi: simplify IPv6 and IPv4 address printing
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
parent
09492605aa
commit
94cb3f822b
1 changed files with 2 additions and 4 deletions
|
@ -2044,13 +2044,11 @@ iscsi_tcp_conn_get_param(struct iscsi_cls_conn *cls_conn,
|
|||
sk = tcp_conn->sock->sk;
|
||||
if (sk->sk_family == PF_INET) {
|
||||
inet = inet_sk(sk);
|
||||
len = sprintf(buf, "%u.%u.%u.%u\n",
|
||||
len = sprintf(buf, NIPQUAD_FMT "\n",
|
||||
NIPQUAD(inet->daddr));
|
||||
} else {
|
||||
np = inet6_sk(sk);
|
||||
len = sprintf(buf,
|
||||
"%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
|
||||
NIP6(np->daddr));
|
||||
len = sprintf(buf, NIP6_FMT "\n", NIP6(np->daddr));
|
||||
}
|
||||
mutex_unlock(&conn->xmitmutex);
|
||||
break;
|
||||
|
|
Reference in a new issue