提交 4d78b6c7 编写于 作者: H Herbert Xu 提交者: David S. Miller

[IPSEC]: COW skb header in UDP decap

The following patch just makes the header part of the skb writeable.
This is needed since we modify the IP headers just a few lines below.
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c7f905f0
......@@ -955,6 +955,8 @@ static int udp_encap_rcv(struct sock * sk, struct sk_buff *skb)
* header and optional ESP marker bytes) and then modify the
* protocol to ESP, and then call into the transform receiver.
*/
if (skb_cloned(skb) && pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
return 0;
/* Now we can update and verify the packet length... */
iph = skb->nh.iph;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册