diff options
| author | Mark Stapp <mjs@voltanet.io> | 2021-03-01 10:48:05 -0500 | 
|---|---|---|
| committer | Mark Stapp <mjs@voltanet.io> | 2021-04-07 15:38:09 -0400 | 
| commit | aef1d5404fabe113e66bbc49499a7eb2b96aaab4 (patch) | |
| tree | 9616c8e85329f88318741a49157eb217bed7782b /zebra/zebra_rnh.c | |
| parent | 964788a11ffa185c89054144a53a2e1a6be69036 (diff) | |
zebra: add config control to hide backup nh events in nht
Add a config that can control hiding of backup-nexthop activation
changes in nexthop-tracking.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'zebra/zebra_rnh.c')
| -rw-r--r-- | zebra/zebra_rnh.c | 18 | 
1 files changed, 18 insertions, 0 deletions
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index 3b0ef71987..0a9ef244b6 100644 --- a/zebra/zebra_rnh.c +++ b/zebra/zebra_rnh.c @@ -52,6 +52,11 @@  DEFINE_MTYPE_STATIC(ZEBRA, RNH, "Nexthop tracking object"); +/* UI controls whether to notify about changes that only involve backup + * nexthops. Default is to notify all changes. + */ +static bool rnh_hide_backups; +  static void free_state(vrf_id_t vrf_id, struct route_entry *re,  		       struct route_node *rn);  static void copy_state(struct rnh *rnh, const struct route_entry *re, @@ -1321,3 +1326,16 @@ int rnh_resolve_via_default(struct zebra_vrf *zvrf, int family)  	else  		return 0;  } + +/* + * UI control to avoid notifications if backup nexthop status changes + */ +void rnh_set_hide_backups(bool hide_p) +{ +	rnh_hide_backups = hide_p; +} + +bool rnh_get_hide_backups(void) +{ +	return rnh_hide_backups; +}  | 
