Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34570
b: refs/heads/master
c: 9afaca0
h: refs/heads/master
v: v3
  • Loading branch information
Masahide NAKAMURA authored and David S. Miller committed Sep 22, 2006
1 parent 8505361 commit f347028
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 060f02a3bdd4d9ba8aa3c48e9b470672b1f3a585
refs/heads/master: 9afaca057980c02771f4657c455cc7592fcd7373
1 change: 1 addition & 0 deletions trunk/include/linux/xfrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ enum xfrm_attr_type_t {
XFRMA_ETIMER_THRESH,
XFRMA_SRCADDR, /* xfrm_address_t */
XFRMA_COADDR, /* xfrm_address_t */
XFRMA_LASTUSED,
__XFRMA_MAX

#define XFRMA_MAX (__XFRMA_MAX - 1)
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/net/xfrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ struct xfrm_state
struct xfrm_lifetime_cur curlft;
struct timer_list timer;

/* Last used time */
u64 lastused;

/* Reference to data common to all the instances of this
* transformer. */
struct xfrm_type *type;
Expand Down
2 changes: 2 additions & 0 deletions trunk/net/ipv6/xfrm6_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ 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;

spin_unlock_bh(&x->lock);

Expand Down
3 changes: 3 additions & 0 deletions trunk/net/xfrm/xfrm_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,9 @@ static int dump_one_state(struct xfrm_state *x, int count, void *ptr)
if (x->coaddr)
RTA_PUT(skb, XFRMA_COADDR, sizeof(*x->coaddr), x->coaddr);

if (x->lastused)
RTA_PUT(skb, XFRMA_LASTUSED, sizeof(x->lastused), &x->lastused);

nlh->nlmsg_len = skb->tail - b;
out:
sp->this_idx++;
Expand Down

0 comments on commit f347028

Please sign in to comment.