summaryrefslogtreecommitdiff
path: root/pathd/pathd.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-01-05 11:10:19 -0500
committerDonald Sharp <sharpd@nvidia.com>2021-01-05 15:37:32 -0500
commit6f4196d72b2aba8497ff91940db60c57647314ec (patch)
treea0d49d9d3dd5e114e413650c525821ead924996b /pathd/pathd.c
parent6b669132759d9ce501e2ab2621f4347f70226e40 (diff)
pathd: Convert to use our internal frr_weak_random
rand() should not be used, we should be using the frr_weak_random() call instead. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'pathd/pathd.c')
-rw-r--r--pathd/pathd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pathd/pathd.c b/pathd/pathd.c
index 2e2fa86714..e2c7c95728 100644
--- a/pathd/pathd.c
+++ b/pathd/pathd.c
@@ -21,6 +21,7 @@
#include "memory.h"
#include "log.h"
#include "lib_errors.h"
+#include "network.h"
#include "pathd/pathd.h"
#include "pathd/path_memory.h"
@@ -480,7 +481,7 @@ struct srte_candidate *srte_candidate_add(struct srte_policy *policy,
candidate->preference = preference;
candidate->policy = policy;
candidate->type = SRTE_CANDIDATE_TYPE_UNDEFINED;
- candidate->discriminator = rand();
+ candidate->discriminator = frr_weak_random();
lsp->candidate = candidate;
candidate->lsp = lsp;