diff options
author | Stephen Worley <sworley@cumulusnetworks.com> | 2019-12-18 22:11:39 +0100 |
---|---|---|
committer | Stephen Worley <sworley@cumulusnetworks.com> | 2020-04-09 19:45:14 +0200 |
commit | f143cffac2a3cfef96b9d6d796673ecc7c545f8f (patch) | |
tree | a601256b0902e7fbd3a5b841b73ebadfde78c3c8 /pbrd/pbr_map.h | |
parent | pbrd: free nexthop_group name on `no set nexthop-group` (diff) | |
download | frr-f143cffac2a3cfef96b9d6d796673ecc7c545f8f.tar.xz frr-f143cffac2a3cfef96b9d6d796673ecc7c545f8f.zip |
pbrd: implement `set *` and `match *` config replacement
Implement the ability to replace any existing `set *` or
`match` with another one or adding more config without having
to first delete the original config already there.
Before, we needed to constantly execute a `no` command for everything
to remove the rule before making changes to it. With this
patch, you can replace configs on individual sequences much
easier.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'pbrd/pbr_map.h')
-rw-r--r-- | pbrd/pbr_map.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pbrd/pbr_map.h b/pbrd/pbr_map.h index 8bd22cbf2..41f170395 100644 --- a/pbrd/pbr_map.h +++ b/pbrd/pbr_map.h @@ -182,7 +182,15 @@ extern void pbr_map_init(void); extern bool pbr_map_check_valid(const char *name); -extern void pbr_map_check(struct pbr_map_sequence *pbrms); +/** + * Re-check the pbr map for validity. + * + * Install if valid, remove if not. + * + * If changed is set, the config on the on the map has changed somewhere + * and the rules need to be replaced if valid. + */ +extern void pbr_map_check(struct pbr_map_sequence *pbrms, bool changed); extern void pbr_map_check_nh_group_change(const char *nh_group); extern void pbr_map_reason_string(unsigned int reason, char *buf, int size); |