X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fipv6%2Fxfrm6_output.c;h=56364a5f676ad71830c9b4118088e29b6da30cc5;hb=40b42f1ebf653cd72c32eb1a1a0b9fea2dfbfd7d;hp=c260ea104c524df24f2a49209b8fe57ba0409efd;hpb=4e6d816e51728d5006c53e78e079ac62b902f8aa;p=linux-2.6 diff --git a/net/ipv6/xfrm6_output.c b/net/ipv6/xfrm6_output.c index c260ea104c..56364a5f67 100644 --- a/net/ipv6/xfrm6_output.c +++ b/net/ipv6/xfrm6_output.c @@ -2,7 +2,7 @@ * xfrm6_output.c - Common IPsec encapsulation code for IPv6. * Copyright (C) 2002 USAGI/WIDE Project * 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 @@ -23,6 +23,8 @@ int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb, return ip6_find_1stfragopt(skb, prevhdr); } +EXPORT_SYMBOL(xfrm6_find_1stfragopt); + static int xfrm6_tunnel_check_size(struct sk_buff *skb) { int mtu, ret = 0; @@ -46,7 +48,7 @@ static int xfrm6_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) @@ -76,12 +78,12 @@ static int xfrm6_output_one(struct sk_buff *skb) x->curlft.bytes += skb->len; x->curlft.packets++; if (x->props.mode == XFRM_MODE_ROUTEOPTIMIZATION) - x->lastused = (u64)xtime.tv_sec; + x->lastused = get_seconds(); spin_unlock_bh(&x->lock); - skb->nh.raw = skb->data; - + skb_reset_network_header(skb); + if (!(skb->dst = dst_pop(dst))) { err = -EHOSTUNREACH; goto error_nolock; @@ -108,7 +110,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); if (unlikely(err != 1))