diff options
| author | Naveen Thanikachalam <nthanikachal@vmware.com> | 2019-05-15 00:09:08 -0700 |
|---|---|---|
| committer | Naveen Thanikachalam <nthanikachal@vmware.com> | 2019-05-31 10:05:19 -0700 |
| commit | e2c8d6ce90a597d7d0ac9149b618f9eef83bf73c (patch) | |
| tree | 2c5121acddf36435f317d11a06ac126f54f413a4 /lib/routemap.h | |
| parent | 9c61cec7e3847a4b9841c7914d57c93e3387929a (diff) | |
lib: Changes made to dependencies of a r-map do not take effect.
Say, more than one sequence of a route-map uses the same named entity
in its match clause. After that entity is removed from any one of the
route-map sequences, any further changes made to that entity doesn't
dynamically take effect.
A reference counter, that allows the named entity to keep a count of
the route-maps dependent on it, has been introduced to address this issue.
Signed-off-by: NaveenThanikachalam <nthanikachal@vmware.com>
Diffstat (limited to 'lib/routemap.h')
| -rw-r--r-- | lib/routemap.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/routemap.h b/lib/routemap.h index 41b8428fa1..d7acd7f3f7 100644 --- a/lib/routemap.h +++ b/lib/routemap.h @@ -125,13 +125,18 @@ struct route_map_rule_cmd { }; /* Route map apply error. */ -enum { RMAP_COMPILE_SUCCESS, +enum { + RMAP_COMPILE_SUCCESS, - /* Route map rule is missing. */ - RMAP_RULE_MISSING, + /* Route map rule is missing. */ + RMAP_RULE_MISSING, - /* Route map rule can't compile */ - RMAP_COMPILE_ERROR }; + /* Route map rule can't compile */ + RMAP_COMPILE_ERROR, + + /* Route map rule is duplicate */ + RMAP_DUPLICATE_RULE +}; /* Route map rule list. */ struct route_map_rule_list { @@ -213,7 +218,8 @@ extern void route_map_finish(void); /* Add match statement to route map. */ extern int route_map_add_match(struct route_map_index *index, - const char *match_name, const char *match_arg); + const char *match_name, const char *match_arg, + route_map_event_t type); /* Delete specified route match rule. */ extern int route_map_delete_match(struct route_map_index *index, |
