diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2005-04-19 22:48:59 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-04-19 22:48:59 -0700 |
commit | 4d78b6c78ae6d87e4c1c8072f42efa716f04afb9 (patch) | |
tree | e04f156e8d74c28b925bf53e62d3e4b424a6ffb7 | |
parent | c7f905f0f6d49ed8c1aa4566c31f0383a0ba0c9d (diff) | |
download | op-kernel-dev-4d78b6c78ae6d87e4c1c8072f42efa716f04afb9.zip op-kernel-dev-4d78b6c78ae6d87e4c1c8072f42efa716f04afb9.tar.gz |
[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: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/udp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 6baddfb..8a21323 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -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; |