summaryrefslogtreecommitdiff
path: root/proto/bgp/bgp.h
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2022-10-10 05:06:19 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2022-10-10 05:06:19 +0200
commit8f79e6b93e32a4eb7e4dda9bd4a9d04400b79d45 (patch)
tree3fb00fa2a37787df14866f9049b6a4003bb558b1 /proto/bgp/bgp.h
parent8478de8817c58af02f7aed1d621013891115a2dc (diff)
BGP: Add option 'next hop prefer global'
Add BGP channel option 'next hop prefer global' that modifies BGP recursive next hop resolution to use global next hop IPv6 address instead of link-local next hop IPv6 address for immediate next hop of received routes.
Diffstat (limited to 'proto/bgp/bgp.h')
-rw-r--r--proto/bgp/bgp.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h
index 5d0e9791..eda5d229 100644
--- a/proto/bgp/bgp.h
+++ b/proto/bgp/bgp.h
@@ -145,6 +145,7 @@ struct bgp_channel_config {
ip_addr next_hop_addr; /* Local address for NEXT_HOP attribute */
u8 next_hop_self; /* Always set next hop to local IP address (NH_*) */
u8 next_hop_keep; /* Do not modify next hop attribute (NH_*) */
+ u8 next_hop_prefer; /* Prefer global or link-local next hop (NHP_*) */
u8 mandatory; /* Channel is mandatory in capability negotiation */
u8 gw_mode; /* How we compute route gateway from next_hop attr, see GW_* */
u8 secondary; /* Accept also non-best routes (i.e. RA_ACCEPTED) */
@@ -187,6 +188,9 @@ struct bgp_channel_config {
#define GW_DIRECT 1
#define GW_RECURSIVE 2
+#define NHP_GLOBAL 1
+#define NHP_LOCAL 2
+
#define BGP_ADD_PATH_RX 1
#define BGP_ADD_PATH_TX 2
#define BGP_ADD_PATH_FULL 3