diff options
-rw-r--r-- | net/ipv6/xfrm6_mode_ro.c | 3 | ||||
-rw-r--r-- | net/xfrm/xfrm_output.c | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/net/ipv6/xfrm6_mode_ro.c b/net/ipv6/xfrm6_mode_ro.c index a7bc8c62317a..4a01cb3c370b 100644 --- a/net/ipv6/xfrm6_mode_ro.c +++ b/net/ipv6/xfrm6_mode_ro.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/skbuff.h> | 30 | #include <linux/skbuff.h> |
31 | #include <linux/spinlock.h> | ||
31 | #include <linux/stringify.h> | 32 | #include <linux/stringify.h> |
32 | #include <linux/time.h> | 33 | #include <linux/time.h> |
33 | #include <net/ipv6.h> | 34 | #include <net/ipv6.h> |
@@ -53,7 +54,9 @@ static int xfrm6_ro_output(struct xfrm_state *x, struct sk_buff *skb) | |||
53 | __skb_pull(skb, hdr_len); | 54 | __skb_pull(skb, hdr_len); |
54 | memmove(ipv6_hdr(skb), iph, hdr_len); | 55 | memmove(ipv6_hdr(skb), iph, hdr_len); |
55 | 56 | ||
57 | spin_lock_bh(&x->lock); | ||
56 | x->lastused = get_seconds(); | 58 | x->lastused = get_seconds(); |
59 | spin_unlock_bh(&x->lock); | ||
57 | 60 | ||
58 | return 0; | 61 | return 0; |
59 | } | 62 | } |
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c index 58d5a746b1c3..b1efdc8850a7 100644 --- a/net/xfrm/xfrm_output.c +++ b/net/xfrm/xfrm_output.c | |||
@@ -53,6 +53,10 @@ int xfrm_output(struct sk_buff *skb) | |||
53 | } | 53 | } |
54 | 54 | ||
55 | do { | 55 | do { |
56 | err = x->outer_mode->output(x, skb); | ||
57 | if (err) | ||
58 | goto error; | ||
59 | |||
56 | spin_lock_bh(&x->lock); | 60 | spin_lock_bh(&x->lock); |
57 | err = xfrm_state_check(x, skb); | 61 | err = xfrm_state_check(x, skb); |
58 | if (err) | 62 | if (err) |
@@ -64,10 +68,6 @@ int xfrm_output(struct sk_buff *skb) | |||
64 | xfrm_replay_notify(x, XFRM_REPLAY_UPDATE); | 68 | xfrm_replay_notify(x, XFRM_REPLAY_UPDATE); |
65 | } | 69 | } |
66 | 70 | ||
67 | err = x->outer_mode->output(x, skb); | ||
68 | if (err) | ||
69 | goto error; | ||
70 | |||
71 | x->curlft.bytes += skb->len; | 71 | x->curlft.bytes += skb->len; |
72 | x->curlft.packets++; | 72 | x->curlft.packets++; |
73 | 73 | ||