summaryrefslogtreecommitdiff
path: root/drivers/target
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2012-09-26 16:00:38 +0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-10-03 01:42:25 +0400
commitcea0b4ceec5d09330fd80c0185532a502db9c2b7 (patch)
tree722136e5bb6c4cc47a603f76fe1a53ade48e66ee /drivers/target
parent904753da183566c71211d23c169a80184648c121 (diff)
downloadlinux-cea0b4ceec5d09330fd80c0185532a502db9c2b7.tar.xz
iscsit: add missing endianess conversion in iscsit_check_inaddr_any
Sparse noticed that INADDR_ANY needs to be converted to big endian before it can be stored in struct sockaddr_in.s_addr. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/iscsi/iscsi_target.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index 29f3b2414596..2e7bf7a51e7f 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -3239,7 +3239,7 @@ static bool iscsit_check_inaddr_any(struct iscsi_np *np)
struct sockaddr_in * sock_in =
(struct sockaddr_in *)&np->np_sockaddr;
- if (sock_in->sin_addr.s_addr == INADDR_ANY)
+ if (sock_in->sin_addr.s_addr == htonl(INADDR_ANY))
ret = true;
}