summaryrefslogtreecommitdiff
path: root/nest/route.h
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2017-07-04 23:36:21 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2017-07-04 23:36:21 +0200
commita1f5e514ef091b82754f38f0e583af40778c7d97 (patch)
treeb449e8da19c061bb4a64857cf29cae9a521cf86f /nest/route.h
parent5220cb63e34961b097d3bc274e394c0fa946d7d3 (diff)
Implement onlink flag for nexthops
Add proper support for per-nexthop onlink flag in routes to handle next hop addresses that are not covered by interface IP ranges. Supported by kernel and static protocols. Thanks to Vincent Bernat for the idea.
Diffstat (limited to 'nest/route.h')
-rw-r--r--nest/route.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/nest/route.h b/nest/route.h
index 6c9b00c2..c1a60ccc 100644
--- a/nest/route.h
+++ b/nest/route.h
@@ -366,12 +366,16 @@ struct nexthop {
ip_addr gw; /* Next hop */
struct iface *iface; /* Outgoing interface */
struct nexthop *next;
+ byte flags;
byte weight;
byte labels_orig; /* Number of labels before hostentry was applied */
byte labels; /* Number of all labels */
u32 label[0];
};
+#define RNF_ONLINK 0x1 /* Gateway is onlink regardless of IP ranges */
+
+
struct rte_src {
struct rte_src *next; /* Hash chain */
struct proto *proto; /* Protocol the source is based on */