diff options
author | Christoph Hellwig <hch@infradead.org> | 2012-09-26 08:00:38 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-10-02 17:42:25 -0400 |
commit | cea0b4ceec5d09330fd80c0185532a502db9c2b7 (patch) | |
tree | 722136e5bb6c4cc47a603f76fe1a53ade48e66ee /drivers/target/iscsi | |
parent | 904753da183566c71211d23c169a80184648c121 (diff) |
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/iscsi')
-rw-r--r-- | drivers/target/iscsi/iscsi_target.c | 2 |
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) | |||
3239 | struct sockaddr_in * sock_in = | 3239 | struct sockaddr_in * sock_in = |
3240 | (struct sockaddr_in *)&np->np_sockaddr; | 3240 | (struct sockaddr_in *)&np->np_sockaddr; |
3241 | 3241 | ||
3242 | if (sock_in->sin_addr.s_addr == INADDR_ANY) | 3242 | if (sock_in->sin_addr.s_addr == htonl(INADDR_ANY)) |
3243 | ret = true; | 3243 | ret = true; |
3244 | } | 3244 | } |
3245 | 3245 | ||