[PATCH] net/ncsi: fix checksum validation in response packet

From: CÃdric Le Goater
Date: Fri Apr 14 2017 - 09:43:53 EST


htonl was used instead of ntohl. Surely a typo.

Signed-off-by: CÃdric Le Goater <clg@xxxxxxxx>
---
net/ncsi/ncsi-rsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ncsi/ncsi-rsp.c b/net/ncsi/ncsi-rsp.c
index 087db775b3dc..d375286b79f2 100644
--- a/net/ncsi/ncsi-rsp.c
+++ b/net/ncsi/ncsi-rsp.c
@@ -52,7 +52,7 @@ static int ncsi_validate_rsp_pkt(struct ncsi_request *nr,

checksum = ncsi_calculate_checksum((unsigned char *)h,
sizeof(*h) + payload - 4);
- if (*pchecksum != htonl(checksum))
+ if (*pchecksum != ntohl(checksum))
return -EINVAL;

return 0;
--
2.7.4