]> err.no Git - linux-2.6/commitdiff
[IPSEC]: Move RO-specific output code into xfrm6_mode_ro.c
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 9 Oct 2007 00:27:19 +0000 (17:27 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:54:56 +0000 (16:54 -0700)
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>
net/ipv6/xfrm6_mode_ro.c
net/xfrm/xfrm_output.c

index 6ad6d7ac6bd70e4604354bb466212ee0b5712501..a15637384b20124e2d1a192034614683481d700b 100644 (file)
@@ -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;
 }
 
index 40d75eccdddab669172ca6a8f6d844fe54f47091..8c852119d190b80a9b56a984ac99c8d3258d64e1 100644 (file)
@@ -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);