aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_input.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-06-26 16:23:13 -0400
committerDavid S. Miller <davem@davemloft.net>2013-06-26 16:23:13 -0400
commita77471ff7069eac4f9b408509dc4c6cb61461a56 (patch)
treefb8ca76be227f2e7a4045a8939951be8c3b04250 /net/xfrm/xfrm_input.c
parenta4a1139b242f03dfb8a5d7a86fa674bda1cf60b2 (diff)
parent4c4d41f200db375b2d2cc6d0a1de0606c8266398 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next
Steffen Klassert says: ==================== Just one patch this time. 1) Drop packets when the matching SA is in larval state and add a statistic counter for that. From Fan Du. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_input.c')
-rw-r--r--net/xfrm/xfrm_input.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
index ab2bb42fe094..88843996f935 100644
--- a/net/xfrm/xfrm_input.c
+++ b/net/xfrm/xfrm_input.c
@@ -163,6 +163,11 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
163 skb->sp->xvec[skb->sp->len++] = x; 163 skb->sp->xvec[skb->sp->len++] = x;
164 164
165 spin_lock(&x->lock); 165 spin_lock(&x->lock);
166 if (unlikely(x->km.state == XFRM_STATE_ACQ)) {
167 XFRM_INC_STATS(net, LINUX_MIB_XFRMACQUIREERROR);
168 goto drop_unlock;
169 }
170
166 if (unlikely(x->km.state != XFRM_STATE_VALID)) { 171 if (unlikely(x->km.state != XFRM_STATE_VALID)) {
167 XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATEINVALID); 172 XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATEINVALID);
168 goto drop_unlock; 173 goto drop_unlock;