summaryrefslogtreecommitdiff
path: root/nest/protocol.h
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2019-09-09 02:55:32 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2019-11-26 18:39:25 +0100
commit5ea39eaa96625ec8274703b1eb2c8f59042a8a32 (patch)
tree0ef3675d3818b86b2ee2c9edaf6663cdf153bbe9 /nest/protocol.h
parentaf02b83b888c693c292960072195f0e1caf1d2a1 (diff)
Nest: Use bitmaps to keep track of exported routes
Use a hierarchical bitmap in a routing table to assign ids to routes, and then use bitmaps (indexed by route id) in channels to keep track whether routes were exported. This avoids unreliable and inefficient re-evaluation of filters for old routes in order to determine whether they were exported.
Diffstat (limited to 'nest/protocol.h')
-rw-r--r--nest/protocol.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/nest/protocol.h b/nest/protocol.h
index c664c1e6..e4ec7fa2 100644
--- a/nest/protocol.h
+++ b/nest/protocol.h
@@ -507,6 +507,7 @@ struct channel {
struct rtable *table;
const struct filter *in_filter; /* Input filter */
const struct filter *out_filter; /* Output filter */
+ struct bmap export_map; /* Keeps track which routes passed export filter */
struct channel_limit rx_limit; /* Receive limit (for in_keep_filtered) */
struct channel_limit in_limit; /* Input limit */
struct channel_limit out_limit; /* Output limit */
@@ -514,6 +515,7 @@ struct channel {
struct event *feed_event; /* Event responsible for feeding */
struct fib_iterator feed_fit; /* Routing table iterator used during feeding */
struct proto_stats stats; /* Per-channel protocol statistics */
+ u32 refeed_count; /* Number of routes exported during refeed regardless of out_limit */
u8 net_type; /* Routing table network type (NET_*), 0 for undefined */
u8 ra_mode; /* Mode of received route advertisements (RA_*) */