X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=net%2Fipv4%2Fxfrm4_output.c;h=44ef208a75cb175bfbff21cae090212a6d996b07;hb=b533f8ae796d1ee0289bf04d4f1e72c02ad4a17d;hp=5fd115f0c54784d30ab2b7e741d28f0b53fa11ae;hpb=7e49e6de30efa716614e280d97963c570f3acf29;p=safe%2Fjmp%2Flinux-2.6 diff --git a/net/ipv4/xfrm4_output.c b/net/ipv4/xfrm4_output.c index 5fd115f..44ef208 100644 --- a/net/ipv4/xfrm4_output.c +++ b/net/ipv4/xfrm4_output.c @@ -1,7 +1,7 @@ /* * xfrm4_output.c - Common IPsec encapsulation code for IPv4. * Copyright (c) 2004 Herbert Xu - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version @@ -22,14 +22,13 @@ static int xfrm4_tunnel_check_size(struct sk_buff *skb) { int mtu, ret = 0; struct dst_entry *dst; - struct iphdr *iph = skb->nh.iph; if (IPCB(skb)->flags & IPSKB_XFRM_TUNNEL_SIZE) goto out; IPCB(skb)->flags |= IPSKB_XFRM_TUNNEL_SIZE; - - if (!(iph->frag_off & htons(IP_DF)) || skb->local_df) + + if (!(ip_hdr(skb)->frag_off & htons(IP_DF)) || skb->local_df) goto out; dst = skb->dst; @@ -47,7 +46,7 @@ static int xfrm4_output_one(struct sk_buff *skb) struct dst_entry *dst = skb->dst; struct xfrm_state *x = dst->xfrm; int err; - + if (skb->ip_summed == CHECKSUM_PARTIAL) { err = skb_checksum_help(skb); if (err) @@ -66,7 +65,7 @@ static int xfrm4_output_one(struct sk_buff *skb) if (err) goto error; - err = x->mode->output(skb); + err = x->mode->output(x, skb); if (err) goto error; @@ -78,7 +77,7 @@ static int xfrm4_output_one(struct sk_buff *skb) x->curlft.packets++; spin_unlock_bh(&x->lock); - + if (!(skb->dst = dst_pop(dst))) { err = -EHOSTUNREACH; goto error_nolock;