summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-10-11 11:07:38 +0200
committerMaria Matejka <mq@ucw.cz>2022-10-12 10:05:14 +0200
commit26552a7ec85e0f8845a2672a797c5cb2c9bf47d5 (patch)
tree06f9b3342a471205f826c72e8db773960b27eef1
parentb83a9d5f9a93d6b01d4b06429195e4508377504c (diff)
Fixed BGP reload limits
-rw-r--r--nest/proto.c12
-rw-r--r--proto/bgp/bgp.c8
2 files changed, 6 insertions, 14 deletions
diff --git a/nest/proto.c b/nest/proto.c
index fcdedda5..0898dc36 100644
--- a/nest/proto.c
+++ b/nest/proto.c
@@ -880,14 +880,10 @@ channel_request_reload(struct channel *c)
CD(c, "Reload requested");
- c->proto->reload_routes(c);
-
- /*
- * Should this be done before reload_routes() hook?
- * Perhaps, but routes are updated asynchronously.
- */
- channel_reset_limit(c, &c->rx_limit, PLD_RX);
- channel_reset_limit(c, &c->in_limit, PLD_IN);
+ if (c->in_keep & RIK_PREFILTER)
+ channel_schedule_reload(c);
+ else
+ c->proto->reload_routes(c);
}
const struct channel_class channel_basic = {
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index 36179eb8..1755c5e4 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -1447,12 +1447,8 @@ bgp_reload_routes(struct channel *C)
struct bgp_proto *p = (void *) C->proto;
struct bgp_channel *c = (void *) C;
- ASSERT(p->conn && (p->route_refresh || (C->in_keep & RIK_PREFILTER)));
-
- if (C->in_keep & RIK_PREFILTER)
- channel_schedule_reload(C);
- else
- bgp_schedule_packet(p->conn, c, PKT_ROUTE_REFRESH);
+ ASSERT(p->conn && p->route_refresh);
+ bgp_schedule_packet(p->conn, c, PKT_ROUTE_REFRESH);
}
static void