diff options
author | James Bottomley <jejb@sparkweed.localdomain> | 2006-09-23 22:03:52 -0400 |
---|---|---|
committer | James Bottomley <jejb@sparkweed.localdomain> | 2006-09-23 22:03:52 -0400 |
commit | 1aedf2ccc60fade26c46fae12e28664d0da3f199 (patch) | |
tree | d91083e3079f1ddb942a382ac2b5a7525570ad59 /net/ipv6/xfrm6_output.c | |
parent | dfdc58ba354adb80d67c99f7be84f95a8e02e466 (diff) | |
parent | 1ab9dd0902df4f4ff56fbf672220549090ab28ba (diff) |
Merge mulgrave-w:git/linux-2.6
Conflicts:
include/linux/blkdev.h
Trivial merge to incorporate tag prototypes.
Diffstat (limited to 'net/ipv6/xfrm6_output.c')
-rw-r--r-- | net/ipv6/xfrm6_output.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/net/ipv6/xfrm6_output.c b/net/ipv6/xfrm6_output.c index c8c8b44a0f58..c260ea104c52 100644 --- a/net/ipv6/xfrm6_output.c +++ b/net/ipv6/xfrm6_output.c | |||
@@ -17,6 +17,12 @@ | |||
17 | #include <net/ipv6.h> | 17 | #include <net/ipv6.h> |
18 | #include <net/xfrm.h> | 18 | #include <net/xfrm.h> |
19 | 19 | ||
20 | int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb, | ||
21 | u8 **prevhdr) | ||
22 | { | ||
23 | return ip6_find_1stfragopt(skb, prevhdr); | ||
24 | } | ||
25 | |||
20 | static int xfrm6_tunnel_check_size(struct sk_buff *skb) | 26 | static int xfrm6_tunnel_check_size(struct sk_buff *skb) |
21 | { | 27 | { |
22 | int mtu, ret = 0; | 28 | int mtu, ret = 0; |
@@ -41,13 +47,13 @@ static int xfrm6_output_one(struct sk_buff *skb) | |||
41 | struct xfrm_state *x = dst->xfrm; | 47 | struct xfrm_state *x = dst->xfrm; |
42 | int err; | 48 | int err; |
43 | 49 | ||
44 | if (skb->ip_summed == CHECKSUM_HW) { | 50 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
45 | err = skb_checksum_help(skb, 0); | 51 | err = skb_checksum_help(skb); |
46 | if (err) | 52 | if (err) |
47 | goto error_nolock; | 53 | goto error_nolock; |
48 | } | 54 | } |
49 | 55 | ||
50 | if (x->props.mode) { | 56 | if (x->props.mode == XFRM_MODE_TUNNEL) { |
51 | err = xfrm6_tunnel_check_size(skb); | 57 | err = xfrm6_tunnel_check_size(skb); |
52 | if (err) | 58 | if (err) |
53 | goto error_nolock; | 59 | goto error_nolock; |
@@ -59,7 +65,7 @@ static int xfrm6_output_one(struct sk_buff *skb) | |||
59 | if (err) | 65 | if (err) |
60 | goto error; | 66 | goto error; |
61 | 67 | ||
62 | err = x->mode->output(skb); | 68 | err = x->mode->output(x, skb); |
63 | if (err) | 69 | if (err) |
64 | goto error; | 70 | goto error; |
65 | 71 | ||
@@ -69,6 +75,8 @@ static int xfrm6_output_one(struct sk_buff *skb) | |||
69 | 75 | ||
70 | x->curlft.bytes += skb->len; | 76 | x->curlft.bytes += skb->len; |
71 | x->curlft.packets++; | 77 | x->curlft.packets++; |
78 | if (x->props.mode == XFRM_MODE_ROUTEOPTIMIZATION) | ||
79 | x->lastused = (u64)xtime.tv_sec; | ||
72 | 80 | ||
73 | spin_unlock_bh(&x->lock); | 81 | spin_unlock_bh(&x->lock); |
74 | 82 | ||
@@ -80,7 +88,7 @@ static int xfrm6_output_one(struct sk_buff *skb) | |||
80 | } | 88 | } |
81 | dst = skb->dst; | 89 | dst = skb->dst; |
82 | x = dst->xfrm; | 90 | x = dst->xfrm; |
83 | } while (x && !x->props.mode); | 91 | } while (x && (x->props.mode != XFRM_MODE_TUNNEL)); |
84 | 92 | ||
85 | IP6CB(skb)->flags |= IP6SKB_XFRM_TRANSFORMED; | 93 | IP6CB(skb)->flags |= IP6SKB_XFRM_TRANSFORMED; |
86 | err = 0; | 94 | err = 0; |