* [PATCH] xfrm: check if packet is overdue on asynchronous code path
@ 2013-01-11 8:12 roy.qing.li
2013-01-11 8:29 ` Steffen Klassert
0 siblings, 1 reply; 2+ messages in thread
From: roy.qing.li @ 2013-01-11 8:12 UTC (permalink / raw)
To: netdev; +Cc: steffen.klassert
From: Li RongQing <roy.qing.li@gmail.com>
Currently checking is only done on synchronous code path,
we should do the same checking on asynchronous code path.
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
---
net/xfrm/xfrm_input.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
index ab2bb42..d034324 100644
--- a/net/xfrm/xfrm_input.c
+++ b/net/xfrm/xfrm_input.c
@@ -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,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xfrm: check if packet is overdue on asynchronous code path
2013-01-11 8:12 [PATCH] xfrm: check if packet is overdue on asynchronous code path roy.qing.li
@ 2013-01-11 8:29 ` Steffen Klassert
0 siblings, 0 replies; 2+ messages in thread
From: Steffen Klassert @ 2013-01-11 8:29 UTC (permalink / raw)
To: roy.qing.li; +Cc: netdev
On Fri, Jan 11, 2013 at 04:12:45PM +0800, roy.qing.li@gmail.com wrote:
> From: Li RongQing <roy.qing.li@gmail.com>
>
> 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-11 8:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-11 8:12 [PATCH] xfrm: check if packet is overdue on asynchronous code path roy.qing.li
2013-01-11 8:29 ` Steffen Klassert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).