netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: "David S. Miller" <davem@davemloft.net>
Cc: "Gavin Shan" <gwshan@linux.vnet.ibm.com>,
	"Joel Stanley" <joel@jms.id.au>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Cédric Le Goater" <clg@kaod.org>
Subject: [PATCH] net/ncsi: fix checksum validation in response packet
Date: Fri, 14 Apr 2017 10:56:37 +0200	[thread overview]
Message-ID: <1492160197-13816-1-git-send-email-clg@kaod.org> (raw)

htonl was used instead of ntohl. Surely a typo.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 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

             reply	other threads:[~2017-04-14 11:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-14  8:56 Cédric Le Goater [this message]
2017-04-17 17:36 ` [PATCH] net/ncsi: fix checksum validation in response packet David Miller
2017-04-18  0:06   ` Gavin Shan
2017-04-18  6:16     ` Cédric Le Goater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1492160197-13816-1-git-send-email-clg@kaod.org \
    --to=clg@kaod.org \
    --cc=davem@davemloft.net \
    --cc=gwshan@linux.vnet.ibm.com \
    --cc=joel@jms.id.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).