xfrm: Move IPsec replay detection functions to a separate file
[pandora-kernel.git] / net / xfrm / xfrm_input.c
index 45f1c98..55d5f5c 100644 (file)
@@ -118,7 +118,7 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
        if (encap_type < 0) {
                async = 1;
                x = xfrm_input_state(skb);
-               seq = XFRM_SKB_CB(skb)->seq.input;
+               seq = XFRM_SKB_CB(skb)->seq.input.low;
                goto resume;
        }
 
@@ -172,7 +172,7 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
                        goto drop_unlock;
                }
 
-               if (x->props.replay_window && xfrm_replay_check(x, skb, seq)) {
+               if (x->props.replay_window && x->repl->check(x, skb, seq)) {
                        XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATESEQERROR);
                        goto drop_unlock;
                }
@@ -184,7 +184,7 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
 
                spin_unlock(&x->lock);
 
-               XFRM_SKB_CB(skb)->seq.input = seq;
+               XFRM_SKB_CB(skb)->seq.input.low = seq;
 
                nexthdr = x->type->input(x, skb);
 
@@ -206,8 +206,7 @@ resume:
                /* only the first xfrm gets the encap type */
                encap_type = 0;
 
-               if (x->props.replay_window)
-                       xfrm_replay_advance(x, seq);
+               x->repl->advance(x, seq);
 
                x->curlft.bytes += skb->len;
                x->curlft.packets++;