From: Herbert Xu Date: Wed, 14 Nov 2007 05:33:01 +0000 (-0800) Subject: [IPSEC]: Use dst->header_len when resizing on output X-Git-Tag: v2.6.25-rc1~1162^2~1460 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=550ade8432a2a6fbfb48ba7018750b0e8c81e8d0;p=linux-2.6-omap-h63xx.git [IPSEC]: Use dst->header_len when resizing on output 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 Signed-off-by: David S. Miller --- diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c index f4bfd6c4565..58d5a746b1c 100644 --- a/net/xfrm/xfrm_output.c +++ b/net/xfrm/xfrm_output.c @@ -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)