X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fipv4%2Fesp4.c;h=4e73e5708e700d276ddb3be80a9452931621a15b;hb=1730554f253deb65fe5112c54b2f898d5318a328;hp=091e6709f83109dc1e229f24bfe3cad71d5be13a;hpb=cdd0972945dbcb8ea24db365d9b0e100af2a27bb;p=linux-2.6 diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index 091e6709f8..4e73e5708e 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c @@ -168,7 +168,7 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb) struct xfrm_encap_tmpl *encap = x->encap; struct udphdr *uh; __be32 *udpdata32; - unsigned int sport, dport; + __be16 sport, dport; int encap_type; spin_lock_bh(&x->lock); @@ -336,7 +336,7 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb) struct scatterlist *asg; int err = -EINVAL; - if (!pskb_may_pull(skb, sizeof(*esph))) + if (!pskb_may_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead))) goto out; if (elen <= 0)