diff options
author | Maria Matejka <mq@ucw.cz> | 2022-08-03 11:57:29 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-08-03 11:57:29 +0200 |
commit | 97476e002d7dfb24a4613ac401b8f3192ca68d05 (patch) | |
tree | b2e05d029ed03f80e18e971384d4086883917a74 /proto/bgp/packets.c | |
parent | 0072d11f3431165240656edf6ade473554b8747e (diff) |
BGP: The bucket/prefix hashes are now a resource to allow for proper cleanup
Diffstat (limited to 'proto/bgp/packets.c')
-rw-r--r-- | proto/bgp/packets.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index de976588..57c00eb5 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -2167,7 +2167,7 @@ bgp_create_ip_reach(struct bgp_write_state *s, struct bgp_bucket *buck, byte *bu * var IPv4 Network Layer Reachability Information */ - ASSERT_DIE(s->channel->withdraw_bucket != buck); + ASSERT_DIE(s->channel->ptx->withdraw_bucket != buck); int lr, la; @@ -2190,7 +2190,7 @@ bgp_create_ip_reach(struct bgp_write_state *s, struct bgp_bucket *buck, byte *bu static byte * bgp_create_mp_reach(struct bgp_write_state *s, struct bgp_bucket *buck, byte *buf, byte *end) { - ASSERT_DIE(s->channel->withdraw_bucket != buck); + ASSERT_DIE(s->channel->ptx->withdraw_bucket != buck); /* * 2 B IPv4 Withdrawn Routes Length (zero) @@ -2330,7 +2330,7 @@ again: ; }; /* Try unreachable bucket */ - if ((buck = c->withdraw_bucket) && !EMPTY_LIST(buck->prefixes)) + if ((buck = c->ptx->withdraw_bucket) && !EMPTY_LIST(buck->prefixes)) { res = (c->afi == BGP_AF_IPV4) && !c->ext_next_hop ? bgp_create_ip_unreach(&s, buck, buf, end): @@ -2340,9 +2340,9 @@ again: ; } /* Try reachable buckets */ - if (!EMPTY_LIST(c->bucket_queue)) + if (!EMPTY_LIST(c->ptx->bucket_queue)) { - buck = HEAD(c->bucket_queue); + buck = HEAD(c->ptx->bucket_queue); /* Cleanup empty buckets */ if (bgp_done_bucket(c, buck)) |