]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[IPSEC]: Use dst->header_len when resizing on output
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 14 Nov 2007 05:33:01 +0000 (21:33 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:53:36 +0000 (14:53 -0800)
Currently we use x->props.header_len when resizing on output.
However, if we're resizing at all we might as well go the whole hog
and do it for the whole dst.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/xfrm/xfrm_output.c

index f4bfd6c4565119f9f3be6cb80547922b930b4f73..58d5a746b1c3e07e4d065590aea88ebbf52b6592 100644 (file)
@@ -19,7 +19,8 @@
 
 static int xfrm_state_check_space(struct xfrm_state *x, struct sk_buff *skb)
 {
-       int nhead = x->props.header_len + LL_RESERVED_SPACE(skb->dst->dev)
+       struct dst_entry *dst = skb->dst;
+       int nhead = dst->header_len + LL_RESERVED_SPACE(dst->dev)
                - skb_headroom(skb);
 
        if (nhead > 0)