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>
This commit is contained in:
parent
904753da18
commit
cea0b4ceec
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue