mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 23:34:05 +08:00
[IPSEC]: Fix IPv6 AH calculation in outbound
Signed-off-by: Kazunori MIYAZAWA <miyazawa@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
aad0e0b9b6
commit
144466bdf8
@ -247,7 +247,7 @@ static int ah6_output(struct xfrm_state *x, struct sk_buff *skb)
|
|||||||
memcpy(tmp_base, top_iph, sizeof(tmp_base));
|
memcpy(tmp_base, top_iph, sizeof(tmp_base));
|
||||||
|
|
||||||
tmp_ext = NULL;
|
tmp_ext = NULL;
|
||||||
extlen = skb_transport_offset(skb) + sizeof(struct ipv6hdr);
|
extlen = skb_transport_offset(skb) - sizeof(struct ipv6hdr);
|
||||||
if (extlen) {
|
if (extlen) {
|
||||||
extlen += sizeof(*tmp_ext);
|
extlen += sizeof(*tmp_ext);
|
||||||
tmp_ext = kmalloc(extlen, GFP_ATOMIC);
|
tmp_ext = kmalloc(extlen, GFP_ATOMIC);
|
||||||
|
Loading…
Reference in New Issue
Block a user