diff options
| author | Russ White <russ@riw.us> | 2023-05-02 10:42:39 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-02 10:42:39 -0400 |
| commit | b9f0c8c8d0f005b38be8f072643159a254b7fd6f (patch) | |
| tree | 6c8ddaab14718aece0cf7ddaf5eae7ac7c43155a /lib/flex_algo.h | |
| parent | 9ab0661b89f3c3b9db76cbe9f0138a8dbd206a1b (diff) | |
| parent | cc1f9bd9e286c40d814c2fc1a71e685ef7753d01 (diff) | |
Merge pull request #13404 from louis-6wind/fix-flex-algo-race-condition
isisd: fix a flex algo race condition and a minor fix
Diffstat (limited to 'lib/flex_algo.h')
| -rw-r--r-- | lib/flex_algo.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/flex_algo.h b/lib/flex_algo.h index e012f46862..81a0af85b8 100644 --- a/lib/flex_algo.h +++ b/lib/flex_algo.h @@ -83,6 +83,11 @@ struct flex_algo { #define FLEX_ALGO_IP 0x04 uint8_t dataplanes; + /* True if the Algorithm is locally enabled (ie. a definition has been + * found and is supported). + */ + bool state; + /* * This property can be freely extended among different routing * protocols. Since Flex-Algo is an IGP protocol agnostic, both IS-IS @@ -118,4 +123,8 @@ bool flex_algo_id_valid(uint16_t algorithm); char *flex_algo_metric_type_print(char *type_str, size_t sz, enum flex_algo_metric_type metric_type); +bool flex_algo_get_state(struct flex_algos *flex_algos, uint8_t algorithm); + +void flex_algo_set_state(struct flex_algos *flex_algos, uint8_t algorithm, + bool state); #endif /* _FRR_FLEX_ALGO_H */ |
