Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78099
b: refs/heads/master
c: a2deb6d
h: refs/heads/master
i:
  78097: 951292e
  78095: 02301be
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Jan 28, 2008
1 parent 194c80a commit 10ec610
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e40b3286158565909692e5914ea4a11bdbcc68c8
refs/heads/master: a2deb6d26f16ed7bf787dbd6a58c5d7be47d8db3
3 changes: 3 additions & 0 deletions trunk/net/ipv6/xfrm6_mode_ro.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/skbuff.h>
#include <linux/spinlock.h>
#include <linux/stringify.h>
#include <linux/time.h>
#include <net/ipv6.h>
Expand All @@ -53,7 +54,9 @@ static int xfrm6_ro_output(struct xfrm_state *x, struct sk_buff *skb)
__skb_pull(skb, hdr_len);
memmove(ipv6_hdr(skb), iph, hdr_len);

spin_lock_bh(&x->lock);
x->lastused = get_seconds();
spin_unlock_bh(&x->lock);

return 0;
}
Expand Down
8 changes: 4 additions & 4 deletions trunk/net/xfrm/xfrm_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ int xfrm_output(struct sk_buff *skb)
}

do {
err = x->outer_mode->output(x, skb);
if (err)
goto error;

spin_lock_bh(&x->lock);
err = xfrm_state_check(x, skb);
if (err)
Expand All @@ -64,10 +68,6 @@ int xfrm_output(struct sk_buff *skb)
xfrm_replay_notify(x, XFRM_REPLAY_UPDATE);
}

err = x->outer_mode->output(x, skb);
if (err)
goto error;

x->curlft.bytes += skb->len;
x->curlft.packets++;

Expand Down

0 comments on commit 10ec610

Please sign in to comment.