netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH net] macsec: fix validation failed in asynchronous operation.
@ 2017-01-21  8:42 Ryder Lee
       [not found] ` <1484988127-25860-1-git-send-email-ryder.lee-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Ryder Lee @ 2017-01-21  8:42 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Sabrina Dubroca, linux-mediatek, Ryder Lee

Add missing "macsec_skb_cb(skb)->valid = true" in callback
function macsec_decrypt_done(), this fixes packet validation
failed while decrypting asynchronously.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
 drivers/net/macsec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
index f83cf66..73d8d39 100644
--- a/drivers/net/macsec.c
+++ b/drivers/net/macsec.c
@@ -880,6 +880,9 @@ static void macsec_decrypt_done(struct crypto_async_request *base, int err)
 	aead_request_free(macsec_skb_cb(skb)->req);
 
 	rcu_read_lock_bh();
+	if (err == 0)
+		macsec_skb_cb(skb)->valid = true;
+
 	pn = ntohl(macsec_ethhdr(skb)->packet_number);
 	if (!macsec_post_decrypt(skb, &macsec->secy, pn)) {
 		rcu_read_unlock_bh();
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [RESEND PATCH net] macsec: fix validation failed in asynchronous operation.
       [not found] ` <1484988127-25860-1-git-send-email-ryder.lee-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
@ 2017-01-22 21:44   ` David Miller
  2017-01-23  1:39     ` Ryder Lee
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2017-01-22 21:44 UTC (permalink / raw)
  To: ryder.lee-NuS5LvNUpcJWk0Htik3J/w
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	sd-y1jBWg8GRStKuXlAQpz2QA


Why are you resending this?

The original posting on Jan 20th made it to the mailing list and is queued
up in patchwork just fine.

Also, regardless of the reason, a "RESEND" patch should always contain an
explanation of why it needs to be resent.  So that the maintainer doesn't
need to ask questions like I am right now.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RESEND PATCH net] macsec: fix validation failed in asynchronous operation.
  2017-01-22 21:44   ` David Miller
@ 2017-01-23  1:39     ` Ryder Lee
  0 siblings, 0 replies; 3+ messages in thread
From: Ryder Lee @ 2017-01-23  1:39 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, sd, linux-mediatek

Sorry for forgetting to explain it. 

The original patch was incomplete, but I sent it out by mistake... 
So please ignore it.

On Sun, 2017-01-22 at 16:44 -0500, David Miller wrote:
> Why are you resending this?
> 
> The original posting on Jan 20th made it to the mailing list and is queued
> up in patchwork just fine.
> 
> Also, regardless of the reason, a "RESEND" patch should always contain an
> explanation of why it needs to be resent.  So that the maintainer doesn't
> need to ask questions like I am right now.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-23  1:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-21  8:42 [RESEND PATCH net] macsec: fix validation failed in asynchronous operation Ryder Lee
     [not found] ` <1484988127-25860-1-git-send-email-ryder.lee-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-01-22 21:44   ` David Miller
2017-01-23  1:39     ` Ryder Lee

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).