aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip
diff options
context:
space:
mode:
authorAloys Augustin <aloaugus@cisco.com>2021-09-26 18:26:15 +0200
committerNeale Ranns <neale@graphiant.com>2021-09-27 07:15:46 +0000
commit400f23f9d02552fb650d6de46bef7ba42b3482fe (patch)
treeb119f652b3f6583e81e3c7504b952aab734b2e52 /src/vnet/ip
parent248210c6ca1716ee2c5e6c974051218930fa4c26 (diff)
ip: fix ip table allocation randomness
This prevents going through the same sequence every time the api is called. Type: fix Change-Id: I3ca3587ab5d1c060e2913ca88501b8dbcdd9c196 Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Diffstat (limited to 'src/vnet/ip')
-rw-r--r--src/vnet/ip/ip_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c
index f5ebd029a46..b5f3e93b33e 100644
--- a/src/vnet/ip/ip_api.c
+++ b/src/vnet/ip/ip_api.c
@@ -608,7 +608,7 @@ u32
ip_table_get_unused_id (fib_protocol_t fproto)
{
int i, j;
- u32 seed = random_default_seed ();
+ static u32 seed = 0;
/* limit to 1M tries */
for (j = 0; j < 1 << 10; j++)
{