[XFRM] IPV6: Update outbound state timestamp for each sending.
With this patch transformation state is updated last used time for each sending. Xtime is used for it like other state lifetime expiration. Mobile IPv6 enabled nodes will want to know traffic status of each binding (e.g. judgement to request binding refresh by correspondent node, or to keep home/care-of nonce alive by mobile node). The last used timestamp is an important hint about it. Based on MIPL2 kernel patch. This patch was also written by: Henrik Petander <petander@tcs.hut.fi> Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
060f02a3bd
commit
9afaca0579
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user