summaryrefslogtreecommitdiff
path: root/proto/bgp/bgp.h
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2019-01-26 19:48:16 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2019-01-26 19:48:16 +0100
commitb8a3608aa59a67364f05dbd0d0332371a200f226 (patch)
treeae5ab5e31d2a95fc357c9ec730fb49548c5f7a20 /proto/bgp/bgp.h
parent5a50a98980a3554b66cedda6992ece4063a0e85a (diff)
BGP: Cleanup channels when going down
When going up, uncleaned old channel state may trigger unexpected conditions crashing bird.
Diffstat (limited to 'proto/bgp/bgp.h')
-rw-r--r--proto/bgp/bgp.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h
index 2b60f90f..cfc88d8e 100644
--- a/proto/bgp/bgp.h
+++ b/proto/bgp/bgp.h
@@ -299,12 +299,16 @@ struct bgp_channel {
/* Rest are BGP specific data */
struct bgp_channel_config *cf;
- pool *pool; /* XXXX */
u32 afi;
u32 index;
const struct bgp_af_desc *desc;
+ rtable *igp_table_ip4; /* Table for recursive IPv4 next hop lookups */
+ rtable *igp_table_ip6; /* Table for recursive IPv6 next hop lookups */
+
+ /* Rest are zeroed when down */
+ pool *pool;
HASH(struct bgp_bucket) bucket_hash; /* Hash table of route buckets */
struct bgp_bucket *withdraw_bucket; /* Withdrawn routes */
list bucket_queue; /* Queue of buckets to send (struct bgp_bucket) */
@@ -312,8 +316,6 @@ struct bgp_channel {
HASH(struct bgp_prefix) prefix_hash; /* Prefixes to be sent */
slab *prefix_slab; /* Slab holding prefix nodes */
- rtable *igp_table_ip4; /* Table for recursive IPv4 next hop lookups */
- rtable *igp_table_ip6; /* Table for recursive IPv6 next hop lookups */
ip_addr next_hop_addr; /* Local address for NEXT_HOP attribute */
ip_addr link_addr; /* Link-local version of next_hop_addr */