aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/xfrm4_input.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/xfrm4_input.c b/net/ipv4/xfrm4_input.c
index 04ceb6e13b9d..e1b8f4b90d80 100644
--- a/net/ipv4/xfrm4_input.c
+++ b/net/ipv4/xfrm4_input.c
@@ -68,7 +68,7 @@ int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type)
68{ 68{
69 int err; 69 int err;
70 u32 spi, seq; 70 u32 spi, seq;
71 struct sec_decap_state xfrm_vec[XFRM_MAX_DEPTH]; 71 struct xfrm_state *xfrm_vec[XFRM_MAX_DEPTH];
72 struct xfrm_state *x; 72 struct xfrm_state *x;
73 int xfrm_nr = 0; 73 int xfrm_nr = 0;
74 int decaps = 0; 74 int decaps = 0;
@@ -99,7 +99,6 @@ int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type)
99 if (xfrm_state_check_expire(x)) 99 if (xfrm_state_check_expire(x))
100 goto drop_unlock; 100 goto drop_unlock;
101 101
102 xfrm_vec[xfrm_nr].decap.decap_type = encap_type;
103 if (x->type->input(x, skb)) 102 if (x->type->input(x, skb))
104 goto drop_unlock; 103 goto drop_unlock;
105 104
@@ -114,7 +113,7 @@ int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type)
114 113
115 spin_unlock(&x->lock); 114 spin_unlock(&x->lock);
116 115
117 xfrm_vec[xfrm_nr++].xvec = x; 116 xfrm_vec[xfrm_nr++] = x;
118 117
119 iph = skb->nh.iph; 118 iph = skb->nh.iph;
120 119
@@ -156,7 +155,8 @@ int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type)
156 if (xfrm_nr + skb->sp->len > XFRM_MAX_DEPTH) 155 if (xfrm_nr + skb->sp->len > XFRM_MAX_DEPTH)
157 goto drop; 156 goto drop;
158 157
159 memcpy(skb->sp->x+skb->sp->len, xfrm_vec, xfrm_nr*sizeof(struct sec_decap_state)); 158 memcpy(skb->sp->xvec + skb->sp->len, xfrm_vec,
159 xfrm_nr * sizeof(xfrm_vec[0]));
160 skb->sp->len += xfrm_nr; 160 skb->sp->len += xfrm_nr;
161 161
162 nf_reset(skb); 162 nf_reset(skb);
@@ -187,7 +187,7 @@ drop_unlock:
187 xfrm_state_put(x); 187 xfrm_state_put(x);
188drop: 188drop:
189 while (--xfrm_nr >= 0) 189 while (--xfrm_nr >= 0)
190 xfrm_state_put(xfrm_vec[xfrm_nr].xvec); 190 xfrm_state_put(xfrm_vec[xfrm_nr]);
191 191
192 kfree_skb(skb); 192 kfree_skb(skb);
193 return 0; 193 return 0;