All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: David Miller <davem@davemloft.net>,
	Herbert Xu <herbert@gondor.apana.org.au>
Cc: netdev@vger.kernel.org
Subject: [PATCH net-2.6 2/4] esp6: Fix scatterlist initialization
Date: Tue, 26 Apr 2011 07:40:23 +0200	[thread overview]
Message-ID: <20110426054023.GG5495@secunet.com> (raw)
In-Reply-To: <20110426053923.GF5495@secunet.com>

When we use IPsec extended sequence numbers, we may overwrite
the last scatterlist of the associated data by the scatterlist
for the skb. This patch fixes this by placing the scatterlist
for the skb right behind the last scatterlist of the associated
data. esp4 does it already like that.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 net/ipv6/esp6.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index 5aa8ec8..59dccfb 100644
--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -371,7 +371,7 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb)
 	iv = esp_tmp_iv(aead, tmp, seqhilen);
 	req = esp_tmp_req(aead, iv);
 	asg = esp_req_sg(aead, req);
-	sg = asg + 1;
+	sg = asg + sglists;
 
 	skb->ip_summed = CHECKSUM_NONE;
 
-- 
1.7.0.4


  reply	other threads:[~2011-04-26  5:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-26  5:39 [PATCH net-2.6 1/4] xfrm: Fix replay window size calculation on initialization Steffen Klassert
2011-04-26  5:40 ` Steffen Klassert [this message]
2011-04-26  5:41   ` [PATCH net-2.6 2/4] esp6: Fix scatterlist initialization Herbert Xu
2011-04-26 19:47     ` David Miller
2011-04-26  5:41 ` [PATCH net-2.6 1/4] xfrm: Fix replay window size calculation on initialization Herbert Xu
2011-04-26 19:47   ` David Miller
2011-04-26  5:41 ` [PATCH net-2.6 3/4] xfrm: Check for the new replay implementation if an esn state is inserted Steffen Klassert
2011-04-26  5:43   ` Herbert Xu
2011-04-26 19:47     ` David Miller
2011-04-26  5:42 ` [PATCH net-2.6 4/4] xfrm: Fix integer underrun on zero sized replay windows Steffen Klassert
2011-04-26  6:01   ` Herbert Xu
2011-04-26 10:58   ` Steffen Klassert
2011-04-26 19:48     ` David Miller

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=20110426054023.GG5495@secunet.com \
    --to=steffen.klassert@secunet.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.