X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=net%2Fipv4%2Fxfrm4_output.c;h=a4edd666318b0f85bb9efb166df3512f78bce8d5;hb=2588fe1d782f1686847493ad643157d5d10bf602;hp=04805c7d79c383359ae895672f2dc24079e1e804;hpb=406ef77c893ebd882209be4e393d64b01fe72054;p=linux-2.6-omap-h63xx.git diff --git a/net/ipv4/xfrm4_output.c b/net/ipv4/xfrm4_output.c index 04805c7d79c..a4edd666318 100644 --- a/net/ipv4/xfrm4_output.c +++ b/net/ipv4/xfrm4_output.c @@ -44,6 +44,7 @@ static inline int xfrm4_output_one(struct sk_buff *skb) { struct dst_entry *dst = skb->dst; struct xfrm_state *x = dst->xfrm; + struct iphdr *iph; int err; if (x->props.mode == XFRM_MODE_TUNNEL) { @@ -56,6 +57,10 @@ static inline int xfrm4_output_one(struct sk_buff *skb) if (err) goto error_nolock; + iph = ip_hdr(skb); + iph->tot_len = htons(skb->len); + ip_send_check(iph); + IPCB(skb)->flags |= IPSKB_XFRM_TRANSFORMED; err = 0; @@ -73,7 +78,7 @@ static int xfrm4_output_finish2(struct sk_buff *skb) while (likely((err = xfrm4_output_one(skb)) == 0)) { nf_reset(skb); - err = nf_hook(PF_INET, NF_IP_LOCAL_OUT, &skb, NULL, + err = nf_hook(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, skb->dst->dev, dst_output); if (unlikely(err != 1)) break; @@ -81,7 +86,7 @@ static int xfrm4_output_finish2(struct sk_buff *skb) if (!skb->dst->xfrm) return dst_output(skb); - err = nf_hook(PF_INET, NF_IP_POST_ROUTING, &skb, NULL, + err = nf_hook(PF_INET, NF_IP_POST_ROUTING, skb, NULL, skb->dst->dev, xfrm4_output_finish2); if (unlikely(err != 1)) break;