Skip to contentSkip to conversation

xfrm: check if packet is overdue on asynchronous code path

PATCH In review [email protected] 2 participants 2 messages Jan 11, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfrm: check if packet is overdue on asynchronous code path

From: Li RongQing <[email protected]>

Currently checking is only done on synchronous code path, we should do the same checking on asynchronous code path.

---
 net/xfrm/xfrm_input.c |    6 ++++++
 1 file changed, 6 insertions(+)
net/xfrm/xfrm_input.c +6 -0
index ab2bb42..d034324 100644
@@ -199,6 +199,12 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
 
 resume:
 		spin_lock(&x->lock);
+
+		if (async && xfrm_state_check_expire(x)) {
+			XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATEEXPIRED);
+			goto drop_unlock;
+		}
+
 		if (nexthdr <= 0) {
 			if (nexthdr == -EBADMSG) {
 				xfrm_audit_state_icvfail(x, skb,
Signature · 1 line
1.7.10.4
maintainer
#1 lore raw
Quoted 4 lines · On Fri, Jan 11, 2013 at 04:12:45PM +0800, [email protected] wrote:

From: Li RongQing <[email protected]>

Currently checking is only done on synchronous code path, we should do the same checking on asynchronous code path.

We do this check already before we enter the asynchronous code path, there is no need to do this check again.