summaryrefslogtreecommitdiffstats
path: root/pathd/pathd.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-01-05 17:10:19 +0100
committerDonald Sharp <sharpd@nvidia.com>2021-01-05 21:37:32 +0100
commit6f4196d72b2aba8497ff91940db60c57647314ec (patch)
treea0d49d9d3dd5e114e413650c525821ead924996b /pathd/pathd.c
parentMerge pull request #7762 from sworleys/PBR-Ipv4/Ipv6-Match-Fixes (diff)
downloadfrr-6f4196d72b2aba8497ff91940db60c57647314ec.tar.xz
frr-6f4196d72b2aba8497ff91940db60c57647314ec.zip
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 2e2fa8671..e2c7c9572 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;