summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2012-09-26 08:00:38 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-10-02 14:42:25 -0700
commitcea0b4ceec5d09330fd80c0185532a502db9c2b7 (patch)
tree722136e5bb6c4cc47a603f76fe1a53ade48e66ee /drivers/target
parent904753da183566c71211d23c169a80184648c121 (diff)
downloadop-kernel-dev-cea0b4ceec5d09330fd80c0185532a502db9c2b7.zip
op-kernel-dev-cea0b4ceec5d09330fd80c0185532a502db9c2b7.tar.gz
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 29f3b24..2e7bf7a 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;
}
OpenPOWER on IntegriCloud