Hi Dave: Actually I only signed off on the first patch :) The second patch creates a dead lock since it does a nested read lock. The solution is simply to get rid of xfrm_init_tempsel and call the af
Doh! I should've read the code first :) It's still a valid clean-up patch though. There is another reason why it won't dead lock. We don't actually ever hold the write lock on afinfo :) Is there any
because I need it for xfrm resolution. There is another reason why it won't dead lock. We don't actually ever hold the write lock on afinfo :) Is there any reason why we dont't just use xfrm_state_af
Why not just use daddr? It's always guaranteed to be correct. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor
Herbert Xu wrote: On Sun, Apr 03, 2005 at 06:48:17PM +0200, Patrick McHardy wrote: Agreed. There is also a bug in my patch, tmpl->daddr can be 0 in which case the daddr passed as an argument to xfrm_
Thanks. Just one more issue that I can think of, the check should only be done when tmpl->id.spi != 0. Otherwise the presence of valid states with differing state selectors will prevent new sessions
Hi Dave: Actually I only signed off on the first patch :) The second patch creates a dead lock since it does a nested read lock. The solution is simply to get rid of xfrm_init_tempsel and call the af
Doh! I should've read the code first :) It's still a valid clean-up patch though. There is another reason why it won't dead lock. We don't actually ever hold the write lock on afinfo :) Is there any
Agreed. There is also a bug in my patch, tmpl->daddr can be 0 in which case the daddr passed as an argument to xfrm_state_find() will be used. My patch only checked tmpl->daddr, this patch fixes it.
Why not just use daddr? It's always guaranteed to be correct. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor
Agreed. There is also a bug in my patch, tmpl->daddr can be 0 in which case the daddr passed as an argument to xfrm_state_find() will be used. My patch only checked tmpl->daddr, this patch fixes it.
Thanks. Just one more issue that I can think of, the check should only be done when tmpl->id.spi != 0. Otherwise the presence of valid states with differing state selectors will prevent new sessions
Yes, because tmpl->id.daddr can be zero when daddr is not zero. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gond