diff options
Diffstat (limited to 'net/ipv6/ah6.c')
-rw-r--r-- | net/ipv6/ah6.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index 84963749ab77..cf58251df4b3 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c | |||
@@ -213,6 +213,7 @@ static int ah6_output(struct xfrm_state *x, struct sk_buff *skb) | |||
213 | ah->reserved = 0; | 213 | ah->reserved = 0; |
214 | ah->spi = x->id.spi; | 214 | ah->spi = x->id.spi; |
215 | ah->seq_no = htonl(++x->replay.oseq); | 215 | ah->seq_no = htonl(++x->replay.oseq); |
216 | xfrm_aevent_doreplay(x); | ||
216 | ahp->icv(ahp, skb, ah->auth_data); | 217 | ahp->icv(ahp, skb, ah->auth_data); |
217 | 218 | ||
218 | err = 0; | 219 | err = 0; |
@@ -353,12 +354,10 @@ static int ah6_init_state(struct xfrm_state *x) | |||
353 | if (x->encap) | 354 | if (x->encap) |
354 | goto error; | 355 | goto error; |
355 | 356 | ||
356 | ahp = kmalloc(sizeof(*ahp), GFP_KERNEL); | 357 | ahp = kzalloc(sizeof(*ahp), GFP_KERNEL); |
357 | if (ahp == NULL) | 358 | if (ahp == NULL) |
358 | return -ENOMEM; | 359 | return -ENOMEM; |
359 | 360 | ||
360 | memset(ahp, 0, sizeof(*ahp)); | ||
361 | |||
362 | ahp->key = x->aalg->alg_key; | 361 | ahp->key = x->aalg->alg_key; |
363 | ahp->key_len = (x->aalg->alg_key_len+7)/8; | 362 | ahp->key_len = (x->aalg->alg_key_len+7)/8; |
364 | ahp->tfm = crypto_alloc_tfm(x->aalg->alg_name, 0); | 363 | ahp->tfm = crypto_alloc_tfm(x->aalg->alg_name, 0); |