]> git.neil.brown.name Git - history.git/commit
[IPSEC]: xfrm_alloc_spi always succeeds on non-trivial range
authorHerbert Xu <herbert@gondor.apana.org.au>
Sat, 31 Jul 2004 16:33:16 +0000 (09:33 -0700)
committerDavid S. Miller <davem@nuts.davemloft.net>
Sat, 31 Jul 2004 16:33:16 +0000 (09:33 -0700)
commit3860b2810d0f5178a2be62541e516e8d8c968375
tree1f0ced3c1e84490eb649db855a0711d76ddd0a63
parent5eb968f95707988ced3badebac1ead6b2352b920
[IPSEC]: xfrm_alloc_spi always succeeds on non-trivial range

xfrm_alloc_spi will always succeed if minspi < maxspi, even if
minspi + 1 == maxspi.  If the range is already occupied this
will obviously lead to breakage.

Of course this is very unlikely to occur in reality due to the
size of the range.  Although with IPCOMP it might actually happen
on a very large server.

The fix is obivous.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@redhat.com>
net/xfrm/xfrm_state.c