aboutsummaryrefslogtreecommitdiff
path: root/net/ipv6/xfrm6_output.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2008-01-11 19:15:08 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 14:53:47 -0800
commitef76bc23ef2acf20c8f7f841a542d8ab74c827c6 (patch)
tree11ae8004f4c25ac91339f13a86fdd9f170faeb2e /net/ipv6/xfrm6_output.c
parentc439cb2e4b13cf1cb2abcd006b906315a3381323 (diff)
[IPV6]: Add ip6_local_out
Most callers of the LOCAL_OUT chain will set the IP packet length before doing so. They also share the same output function dst_output. This patch creates a new function called ip6_local_out which does all of that and converts the appropriate users over to it. Apart from removing duplicate code, it will also help in merging the IPsec output path. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/xfrm6_output.c')
-rw-r--r--net/ipv6/xfrm6_output.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/net/ipv6/xfrm6_output.c b/net/ipv6/xfrm6_output.c
index c45050cfe72..0f0ff51f6db 100644
--- a/net/ipv6/xfrm6_output.c
+++ b/net/ipv6/xfrm6_output.c
@@ -75,16 +75,12 @@ EXPORT_SYMBOL(xfrm6_prepare_output);
static inline int xfrm6_output_one(struct sk_buff *skb)
{
- struct ipv6hdr *iph;
int err;
err = xfrm_output(skb);
if (err)
goto error_nolock;
- iph = ipv6_hdr(skb);
- iph->payload_len = htons(skb->len - sizeof(*iph));
-
IP6CB(skb)->flags |= IP6SKB_XFRM_TRANSFORMED;
err = 0;
@@ -102,8 +98,7 @@ static int xfrm6_output_finish2(struct sk_buff *skb)
while (likely((err = xfrm6_output_one(skb)) == 0)) {
nf_reset(skb);
- err = nf_hook(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL,
- skb->dst->dev, dst_output);
+ err = __ip6_local_out(skb);
if (unlikely(err != 1))
break;