summaryrefslogtreecommitdiffstats
path: root/proto/bgp/bgp.h
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-04-10 13:21:40 +0200
committerMartin Mares <mj@ucw.cz>2000-04-10 13:21:40 +0200
commit48e842cc98b1436da57c8682c6c8414ba379ed7c (patch)
tree59bfccdddf0837f0031aaf94fc4cb81e7a6f651c /proto/bgp/bgp.h
parent287111fed1c8e9eb135df1108ea747e02b30e9e9 (diff)
downloadbird-48e842cc98b1436da57c8682c6c8414ba379ed7c.tar
bird-48e842cc98b1436da57c8682c6c8414ba379ed7c.zip
Use neighbor cache to track direct route to the peer or multihop destination.
Calculate next_hop properly based on the local address we get from the neighbor entry.
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 45f7e0b..6ae594a 100644
--- a/proto/bgp/bgp.h
+++ b/proto/bgp/bgp.h
@@ -18,6 +18,7 @@ struct bgp_config {
ip_addr remote_ip;
int multihop; /* Number of hops if multihop */
ip_addr multihop_via; /* Multihop: address to route to */
+ int next_hop_self; /* Always set next hop to local IP address */
unsigned connect_retry_time;
unsigned hold_time, initial_hold_time;
unsigned keepalive_time;
@@ -49,6 +50,9 @@ struct bgp_proto {
struct bgp_conn outgoing_conn; /* Outgoing connection we're working with */
struct bgp_conn incoming_conn; /* Incoming connection we have neither accepted nor rejected yet */
struct object_lock *lock; /* Lock for neighbor connection */
+ ip_addr next_hop; /* Either the peer or multihop_via */
+ struct neighbor *neigh; /* Neighbor entry corresponding to next_hop */
+ ip_addr local_addr; /* Address of the local end of the link to next_hop */
};
#define BGP_PORT 179