summaryrefslogtreecommitdiff
path: root/nest
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2012-11-15 01:29:01 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2012-11-15 01:29:01 +0100
commit15550957957f3c790f3bec3f6b8721559ea25969 (patch)
tree6e0721146734c2db29ca961d3b91d92faf004916 /nest
parente16469bc4d182428687a5ef5f2fb4707afa15abd (diff)
Changes 'rejected' to 'filtered' in one of the last patches.
Diffstat (limited to 'nest')
-rw-r--r--nest/config.Y10
-rw-r--r--nest/proto.c16
-rw-r--r--nest/protocol.h6
-rw-r--r--nest/route.h10
-rw-r--r--nest/rt-table.c20
5 files changed, 31 insertions, 31 deletions
diff --git a/nest/config.Y b/nest/config.Y
index 93402d90..cb6a85c2 100644
--- a/nest/config.Y
+++ b/nest/config.Y
@@ -44,7 +44,7 @@ CF_DECLS
CF_KEYWORDS(ROUTER, ID, PROTOCOL, TEMPLATE, PREFERENCE, DISABLED, DEBUG, ALL, OFF, DIRECT)
CF_KEYWORDS(INTERFACE, IMPORT, EXPORT, FILTER, NONE, TABLE, STATES, ROUTES, FILTERS)
-CF_KEYWORDS(LIMIT, ACTION, WARN, BLOCK, RESTART, DISABLE, KEEP, REJECTED)
+CF_KEYWORDS(LIMIT, ACTION, WARN, BLOCK, RESTART, DISABLE, KEEP, FILTERED)
CF_KEYWORDS(PASSWORD, FROM, PASSIVE, TO, ID, EVENTS, PACKETS, PROTOCOLS, INTERFACES)
CF_KEYWORDS(PRIMARY, STATS, COUNT, FOR, COMMANDS, PREEXPORT, GENERATE, ROA, MAX, FLUSH)
CF_KEYWORDS(LISTEN, BGP, V6ONLY, DUAL, ADDRESS, PORT, PASSWORDS, DESCRIPTION, SORTED)
@@ -187,7 +187,7 @@ proto_item:
| EXPORT imexport { this_proto->out_filter = $2; }
| IMPORT LIMIT limit_spec { this_proto->in_limit = $3; }
| EXPORT LIMIT limit_spec { this_proto->out_limit = $3; }
- | IMPORT KEEP REJECTED bool { this_proto->in_keep_rejected = $4; }
+ | IMPORT KEEP FILTERED bool { this_proto->in_keep_filtered = $4; }
| TABLE rtable { this_proto->table = $2; }
| ROUTER ID idval { this_proto->router_id = $3; }
| DESCRIPTION TEXT { this_proto->dsc = $2; }
@@ -406,7 +406,7 @@ CF_CLI(SHOW INTERFACES SUMMARY,,, [[Show summary of network interfaces]])
{ if_show_summary(); } ;
CF_CLI_HELP(SHOW ROUTE, ..., [[Show routing table]])
-CF_CLI(SHOW ROUTE, r_args, [[[<prefix>|for <prefix>|for <ip>] [table <t>] [filter <f>|where <cond>] [all] [primary] [rejected] [(export|preexport) <p>] [protocol <p>] [stats|count]]], [[Show routing table]])
+CF_CLI(SHOW ROUTE, r_args, [[[<prefix>|for <prefix>|for <ip>] [table <t>] [filter <f>|where <cond>] [all] [primary] [filtered] [(export|preexport) <p>] [protocol <p>] [stats|count]]], [[Show routing table]])
{ rt_show($3); } ;
r_args:
@@ -452,9 +452,9 @@ r_args:
$$ = $1;
$$->primary_only = 1;
}
- | r_args REJECTED {
+ | r_args FILTERED {
$$ = $1;
- $$->rejected = 1;
+ $$->filtered = 1;
}
| r_args export_or_preexport SYM {
struct proto_config *c = (struct proto_config *) $3->def;
diff --git a/nest/proto.c b/nest/proto.c
index 2fb0e796..e9afa2fe 100644
--- a/nest/proto.c
+++ b/nest/proto.c
@@ -414,7 +414,7 @@ proto_reconfigure(struct proto *p, struct proto_config *oc, struct proto_config
p->main_ahook->out_filter = nc->out_filter;
p->main_ahook->in_limit = nc->in_limit;
p->main_ahook->out_limit = nc->out_limit;
- p->main_ahook->in_keep_rejected = nc->in_keep_rejected;
+ p->main_ahook->in_keep_filtered = nc->in_keep_filtered;
}
/* Update routes when filters changed. If the protocol in not UP,
@@ -720,7 +720,7 @@ proto_fell_down(struct proto *p)
{
DBG("Protocol %s down\n", p->name);
- u32 all_routes = p->stats.imp_routes + p->stats.rej_routes;
+ u32 all_routes = p->stats.imp_routes + p->stats.filt_routes;
if (all_routes != 0)
log(L_ERR "Protocol %s is down but still has %d routes", p->name, all_routes);
@@ -798,7 +798,7 @@ proto_schedule_feed(struct proto *p, int initial)
p->main_ahook->out_filter = p->cf->out_filter;
p->main_ahook->in_limit = p->cf->in_limit;
p->main_ahook->out_limit = p->cf->out_limit;
- p->main_ahook->in_keep_rejected = p->cf->in_keep_rejected;
+ p->main_ahook->in_keep_filtered = p->cf->in_keep_filtered;
proto_reset_limit(p->main_ahook->in_limit);
proto_reset_limit(p->main_ahook->out_limit);
}
@@ -1096,11 +1096,11 @@ proto_state_name(struct proto *p)
}
static void
-proto_show_stats(struct proto_stats *s, int in_keep_rejected)
+proto_show_stats(struct proto_stats *s, int in_keep_filtered)
{
- if (in_keep_rejected)
- cli_msg(-1006, " Routes: %u imported, %u rejected, %u exported, %u preferred",
- s->imp_routes, s->rej_routes, s->exp_routes, s->pref_routes);
+ if (in_keep_filtered)
+ cli_msg(-1006, " Routes: %u imported, %u filtered, %u exported, %u preferred",
+ s->imp_routes, s->filt_routes, s->exp_routes, s->pref_routes);
else
cli_msg(-1006, " Routes: %u imported, %u exported, %u preferred",
s->imp_routes, s->exp_routes, s->pref_routes);
@@ -1142,7 +1142,7 @@ proto_show_basic_info(struct proto *p)
proto_show_limit(p->cf->out_limit, "Export limit:");
if (p->proto_state != PS_DOWN)
- proto_show_stats(&p->stats, p->cf->in_keep_rejected);
+ proto_show_stats(&p->stats, p->cf->in_keep_filtered);
}
void
diff --git a/nest/protocol.h b/nest/protocol.h
index b10016d7..cf2ca0a4 100644
--- a/nest/protocol.h
+++ b/nest/protocol.h
@@ -91,7 +91,7 @@ struct proto_config {
int class; /* SYM_PROTO or SYM_TEMPLATE */
u32 debug, mrtdump; /* Debugging bitfields, both use D_* constants */
unsigned preference, disabled; /* Generic parameters */
- int in_keep_rejected; /* Routes rejected in import filter are kept */
+ int in_keep_filtered; /* Routes rejected in import filter are kept */
u32 router_id; /* Protocol specific router ID */
struct rtable_config *table; /* Table we're attached to */
struct filter *in_filter, *out_filter; /* Attached filters */
@@ -107,7 +107,7 @@ struct proto_config {
struct proto_stats {
/* Import - from protocol to core */
u32 imp_routes; /* Number of routes successfully imported to the (adjacent) routing table */
- u32 rej_routes; /* Number of routes rejected in import filter but kept in the routing table */
+ u32 filt_routes; /* Number of routes rejected in import filter but kept in the routing table */
u32 pref_routes; /* Number of routes that are preferred, sum over all routing tables */
u32 imp_updates_received; /* Number of route updates received */
u32 imp_updates_invalid; /* Number of route updates rejected as invalid */
@@ -412,7 +412,7 @@ struct announce_hook {
struct proto_limit *out_limit; /* Output limit */
struct proto_stats *stats; /* Per-table protocol statistics */
struct announce_hook *next; /* Next hook for the same protocol */
- int in_keep_rejected; /* Routes rejected in import filter are kept */
+ int in_keep_filtered; /* Routes rejected in import filter are kept */
};
struct announce_hook *proto_add_announce_hook(struct proto *p, struct rtable *t, struct proto_stats *stats);
diff --git a/nest/route.h b/nest/route.h
index 3c10fc55..177baa38 100644
--- a/nest/route.h
+++ b/nest/route.h
@@ -221,13 +221,13 @@ typedef struct rte {
} rte;
#define REF_COW 1 /* Copy this rte on write */
-#define REF_REJECTED 2 /* Route is rejected by import filter */
+#define REF_FILTERED 2 /* Route is rejected by import filter */
/* Route is valid for propagation (may depend on other flags in the future), accepts NULL */
-static inline int rte_is_valid(rte *r) { return r && !(r->flags & REF_REJECTED); }
+static inline int rte_is_valid(rte *r) { return r && !(r->flags & REF_FILTERED); }
-/* Route just has REF_REJECTED flag */
-static inline int rte_is_rejected(rte *r) { return !!(r->flags & REF_REJECTED); }
+/* Route just has REF_FILTERED flag */
+static inline int rte_is_filtered(rte *r) { return !!(r->flags & REF_FILTERED); }
/* Types of route announcement, also used as flags */
@@ -271,7 +271,7 @@ struct rt_show_data {
struct fib_iterator fit;
struct proto *show_protocol;
struct proto *export_protocol;
- int export_mode, primary_only, rejected;
+ int export_mode, primary_only, filtered;
struct config *running_on_config;
int net_counter, rt_counter, show_counter;
int stats, show_for;
diff --git a/nest/rt-table.c b/nest/rt-table.c
index 421a05ea..102218b2 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -667,7 +667,7 @@ rte_recalculate(struct announce_hook *ah, net *net, rte *new, ea_list *tmpa, str
{
/* No changes, ignore the new route */
- if (!rte_is_rejected(new))
+ if (!rte_is_filtered(new))
{
stats->imp_updates_ignored++;
rte_trace_in(D_ROUTES, p, new, "ignored");
@@ -701,7 +701,7 @@ rte_recalculate(struct announce_hook *ah, net *net, rte *new, ea_list *tmpa, str
struct proto_limit *l = ah->in_limit;
if (l && !old && new)
{
- u32 all_routes = stats->imp_routes + stats->rej_routes;
+ u32 all_routes = stats->imp_routes + stats->filt_routes;
if (all_routes >= l->limit)
proto_notify_limit(ah, l, all_routes);
@@ -715,15 +715,15 @@ rte_recalculate(struct announce_hook *ah, net *net, rte *new, ea_list *tmpa, str
}
}
- if (new && !rte_is_rejected(new))
+ if (new && !rte_is_filtered(new))
stats->imp_updates_accepted++;
else
stats->imp_withdraws_accepted++;
if (new)
- rte_is_rejected(new) ? stats->rej_routes++ : stats->imp_routes++;
+ rte_is_filtered(new) ? stats->filt_routes++ : stats->imp_routes++;
if (old)
- rte_is_rejected(old) ? stats->rej_routes-- : stats->imp_routes--;
+ rte_is_filtered(old) ? stats->filt_routes-- : stats->imp_routes--;
if (table->config->sorted)
{
@@ -929,11 +929,11 @@ rte_update2(struct announce_hook *ah, net *net, rte *new, struct proto *src)
stats->imp_updates_filtered++;
rte_trace_in(D_FILTERS, p, new, "filtered out");
- if (! ah->in_keep_rejected)
+ if (! ah->in_keep_filtered)
goto drop;
/* new is a private copy, i could modify it */
- new->flags |= REF_REJECTED;
+ new->flags |= REF_FILTERED;
}
else
{
@@ -948,10 +948,10 @@ rte_update2(struct announce_hook *ah, net *net, rte *new, struct proto *src)
stats->imp_updates_filtered++;
rte_trace_in(D_FILTERS, p, new, "filtered out");
- if (! ah->in_keep_rejected)
+ if (! ah->in_keep_filtered)
goto drop;
- new->flags |= REF_REJECTED;
+ new->flags |= REF_FILTERED;
}
if (tmpa != old_tmpa && src->store_tmp_attrs)
src->store_tmp_attrs(new, tmpa);
@@ -2023,7 +2023,7 @@ rt_show_net(struct cli *c, net *n, struct rt_show_data *d)
for(e=n->routes; e; e=e->next)
{
- if (rte_is_rejected(e) != d->rejected)
+ if (rte_is_filtered(e) != d->filtered)
continue;
struct ea_list *tmpa;