diff options
| author | Mark Stapp <mjs@voltanet.io> | 2018-07-12 16:05:19 -0400 |
|---|---|---|
| committer | Mark Stapp <mjs@voltanet.io> | 2018-07-23 10:34:35 -0400 |
| commit | 123214efb82f6348cd80c387be15a1e2e21ce63e (patch) | |
| tree | 9120c8e331acfb05b30eed616f34967fae8b30c0 /lib/filter.c | |
| parent | c4aee4fe3133127f16d3967e74e52b262438d57f (diff) | |
libs, daemons: use const in route-map apply
Use 'const prefix *' in route-map apply apis; led to some
corresponding changes in several daemons.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'lib/filter.c')
| -rw-r--r-- | lib/filter.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/filter.c b/lib/filter.c index 670c65374a..0528b0f2ad 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -157,7 +157,7 @@ static const char *filter_type_str(struct filter *filter) } /* If filter match to the prefix then return 1. */ -static int filter_match_cisco(struct filter *mfilter, struct prefix *p) +static int filter_match_cisco(struct filter *mfilter, const struct prefix *p) { struct filter_cisco *filter; struct in_addr mask; @@ -181,7 +181,7 @@ static int filter_match_cisco(struct filter *mfilter, struct prefix *p) } /* If filter match to the prefix then return 1. */ -static int filter_match_zebra(struct filter *mfilter, struct prefix *p) +static int filter_match_zebra(struct filter *mfilter, const struct prefix *p) { struct filter_zebra *filter = NULL; @@ -372,10 +372,11 @@ static struct access_list *access_list_get(afi_t afi, const char *name) } /* Apply access list to object (which should be struct prefix *). */ -enum filter_type access_list_apply(struct access_list *access, void *object) +enum filter_type access_list_apply(struct access_list *access, + const void *object) { struct filter *filter; - struct prefix *p = (struct prefix *)object; + const struct prefix *p = (const struct prefix *)object; if (access == NULL) return FILTER_DENY; |
