]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixed BGP reload limits
authorMaria Matejka <mq@ucw.cz>
Tue, 11 Oct 2022 09:07:38 +0000 (11:07 +0200)
committerMaria Matejka <mq@ucw.cz>
Wed, 12 Oct 2022 08:05:14 +0000 (10:05 +0200)
nest/proto.c
proto/bgp/bgp.c

index fcdedda566dc118635acc445d99cad40dd4f311c..0898dc36f15b4c2e4144fc8a23a67a7e96d15b1e 100644 (file)
@@ -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 = {
index 36179eb8c1fd47966ef626ba2af740bf24e51719..1755c5e4b892df5aa77d778e8ac75192e8927b7d 100644 (file)
@@ -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