diff options
author | David S. Miller <davem@davemloft.net> | 2018-12-20 08:21:47 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-20 08:21:47 -0800 |
commit | ac68a3d3c3eba61c693d63a89223e1df8fe1f0c6 (patch) | |
tree | a22c1d9403987da5517b888dfa1906bced8de07e /net/ipv6 | |
parent | a9cd3439e3c6d777a05c63b4d06c3500d1d4074e (diff) | |
parent | fa89a4593b927b3f59c3b69379f31d3b22272e4e (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next
Steffen Klassert says:
====================
pull request (net-next): ipsec-next 2018-12-20
Two last patches for this release cycle:
1) Remove an unused variable in xfrm_policy_lookup_bytype().
From YueHaibing.
2) Fix possible infinite loop in __xfrm6_tunnel_alloc_spi().
Also from YueHaibing.
Please pull or let me know if there are problems.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/xfrm6_tunnel.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c index 4a46df8441c9..f5b4febeaa25 100644 --- a/net/ipv6/xfrm6_tunnel.c +++ b/net/ipv6/xfrm6_tunnel.c @@ -144,6 +144,9 @@ static u32 __xfrm6_tunnel_alloc_spi(struct net *net, xfrm_address_t *saddr) index = __xfrm6_tunnel_spi_check(net, spi); if (index >= 0) goto alloc_spi; + + if (spi == XFRM6_TUNNEL_SPI_MAX) + break; } for (spi = XFRM6_TUNNEL_SPI_MIN; spi < xfrm6_tn->spi; spi++) { index = __xfrm6_tunnel_spi_check(net, spi); |