As it stands, unless a state is used within a second of its creation, it may never get expired via hard_use_expire_seconds. This patch fixes that by using add_time if use_time is zero. Thanks, -- Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ ) Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Index: net/xfrm/xfrm_state.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/net/xfrm/xfrm_state.c,v retrieving revision 1.1.1.3 diff -u -r1.1.1.3 xfrm_state.c --- net/xfrm/xfrm_state.c 27 May 2003 08:38:41 -0000 1.1.1.3 +++ net/xfrm/xfrm_state.c 31 May 2003 23:04:09 -0000 @@ -112,9 +112,9 @@ if (tmo < next) next = tmo; } - if (x->lft.hard_use_expires_seconds && x->curlft.use_time) { + if (x->lft.hard_use_expires_seconds) { long tmo = x->lft.hard_use_expires_seconds + - x->curlft.use_time - now; + (x->curlft.use_time ?: x->curlft.add_time) - now; if (tmo <= 0) goto expired; if (tmo < next)