Commit 45b17f48 authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

[IPSEC]: Move RO-specific output code into xfrm6_mode_ro.c

The lastused update check in xfrm_output can be done just as well in
the mode output function which is specific to RO.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cdf7e668
......@@ -29,6 +29,7 @@
#include <linux/module.h>
#include <linux/skbuff.h>
#include <linux/stringify.h>
#include <linux/time.h>
#include <net/ipv6.h>
#include <net/xfrm.h>
......@@ -57,6 +58,9 @@ static int xfrm6_ro_output(struct xfrm_state *x, struct sk_buff *skb)
(prevhdr - x->props.header_len) - skb->data);
skb_set_transport_header(skb, hdr_len);
memmove(skb->data, iph, hdr_len);
x->lastused = get_seconds();
return 0;
}
......
......@@ -14,7 +14,6 @@
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/spinlock.h>
#include <linux/time.h>
#include <net/dst.h>
#include <net/xfrm.h>
......@@ -75,9 +74,6 @@ int xfrm_output(struct sk_buff *skb)
x->curlft.bytes += skb->len;
x->curlft.packets++;
if (x->props.mode == XFRM_MODE_ROUTEOPTIMIZATION)
x->lastused = get_seconds();
spin_unlock_bh(&x->lock);
skb_reset_network_header(skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment