Skip to content

Commit cea0b4c

Browse files
Christoph HellwigNicholas Bellinger
authored andcommitted
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>
1 parent 904753d commit cea0b4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/target/iscsi/iscsi_target.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3239,7 +3239,7 @@ static bool iscsit_check_inaddr_any(struct iscsi_np *np)
32393239
struct sockaddr_in * sock_in =
32403240
(struct sockaddr_in *)&np->np_sockaddr;
32413241

3242-
if (sock_in->sin_addr.s_addr == INADDR_ANY)
3242+
if (sock_in->sin_addr.s_addr == htonl(INADDR_ANY))
32433243
ret = true;
32443244
}
32453245

0 commit comments

Comments
 (0)