mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -3239,7 +3239,7 @@ static bool iscsit_check_inaddr_any(struct iscsi_np *np)
|
||||||
struct sockaddr_in * sock_in =
|
struct sockaddr_in * sock_in =
|
||||||
(struct sockaddr_in *)&np->np_sockaddr;
|
(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;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue