diff options
author | Donald Sharp <sharpd@nvidia.com> | 2021-01-05 17:10:19 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2021-01-05 21:37:32 +0100 |
commit | 6f4196d72b2aba8497ff91940db60c57647314ec (patch) | |
tree | a0d49d9d3dd5e114e413650c525821ead924996b /pathd/pathd.c | |
parent | Merge pull request #7762 from sworleys/PBR-Ipv4/Ipv6-Match-Fixes (diff) | |
download | frr-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.c | 3 |
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; |