|
@@ -144,6 +144,9 @@ static u32 __xfrm6_tunnel_alloc_spi(struct net *net, xfrm_address_t *saddr)
|
|
|
index = __xfrm6_tunnel_spi_check(net, spi);
|
|
index = __xfrm6_tunnel_spi_check(net, spi);
|
|
|
if (index >= 0)
|
|
if (index >= 0)
|
|
|
goto alloc_spi;
|
|
goto alloc_spi;
|
|
|
|
|
+
|
|
|
|
|
+ if (spi == XFRM6_TUNNEL_SPI_MAX)
|
|
|
|
|
+ break;
|
|
|
}
|
|
}
|
|
|
for (spi = XFRM6_TUNNEL_SPI_MIN; spi < xfrm6_tn->spi; spi++) {
|
|
for (spi = XFRM6_TUNNEL_SPI_MIN; spi < xfrm6_tn->spi; spi++) {
|
|
|
index = __xfrm6_tunnel_spi_check(net, spi);
|
|
index = __xfrm6_tunnel_spi_check(net, spi);
|