summaryrefslogtreecommitdiff
path: root/nest/protocol.h
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2012-11-10 14:26:13 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2012-11-10 14:26:13 +0100
commitcf98be7b6743e45dde9e0458664cc0762bf08867 (patch)
tree5da3a2cadf1b13bb9c8495b7d82f006ea39fcbf5 /nest/protocol.h
parentdd4da6f640fb581cbd7d1ca537bf382558492b8e (diff)
Allows rejected routes to be kept and examined.
When 'import keep rejected' protocol option is activated, routes rejected by the import filter are kept in the routing table, but they are hidden and not propagated to other protocols. It is possible to examine them using 'show route rejected'.
Diffstat (limited to 'nest/protocol.h')
-rw-r--r--nest/protocol.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/nest/protocol.h b/nest/protocol.h
index 11fcb164..b10016d7 100644
--- a/nest/protocol.h
+++ b/nest/protocol.h
@@ -91,6 +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 */
u32 router_id; /* Protocol specific router ID */
struct rtable_config *table; /* Table we're attached to */
struct filter *in_filter, *out_filter; /* Attached filters */
@@ -106,7 +107,8 @@ 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 pref_routes; /* Number of routes that are preferred, sum over all routing table */
+ u32 rej_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 */
u32 imp_updates_filtered; /* Number of route updates rejected by filters */
@@ -410,6 +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 */
};
struct announce_hook *proto_add_announce_hook(struct proto *p, struct rtable *t, struct proto_stats *stats);