aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-10-08 17:27:19 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:54:56 -0700
commit45b17f48eaf5e5ff4202454985557b3240141caa (patch)
tree00b0b9dc375899b5d1f8ee11f78ef5dcc9b1c2e1 /net
parentcdf7e668d4327a33e11be04c4cb9bcc604eaaa0f (diff)
downloadkernel_samsung_tuna-45b17f48eaf5e5ff4202454985557b3240141caa.zip
kernel_samsung_tuna-45b17f48eaf5e5ff4202454985557b3240141caa.tar.gz
kernel_samsung_tuna-45b17f48eaf5e5ff4202454985557b3240141caa.tar.bz2
[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: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/xfrm6_mode_ro.c4
-rw-r--r--net/xfrm/xfrm_output.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv6/xfrm6_mode_ro.c b/net/ipv6/xfrm6_mode_ro.c
index 6ad6d7a..a156373 100644
--- a/net/ipv6/xfrm6_mode_ro.c
+++ b/net/ipv6/xfrm6_mode_ro.c
@@ -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;
}
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
index 40d75ec..8c85211 100644
--- a/net/xfrm/xfrm_output.c
+++ b/net/xfrm/xfrm_output.c
@@ -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);