From: Herbert Xu Date: Tue, 9 Oct 2007 00:27:19 +0000 (-0700) Subject: [IPSEC]: Move RO-specific output code into xfrm6_mode_ro.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=45b17f48eaf5e5ff4202454985557b3240141caa;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [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 Signed-off-by: David S. Miller --- diff --git a/net/ipv6/xfrm6_mode_ro.c b/net/ipv6/xfrm6_mode_ro.c index 6ad6d7ac6bd7..a15637384b20 100644 --- a/net/ipv6/xfrm6_mode_ro.c +++ b/net/ipv6/xfrm6_mode_ro.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -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 40d75eccddda..8c852119d190 100644 --- a/net/xfrm/xfrm_output.c +++ b/net/xfrm/xfrm_output.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include @@ -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);