summaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
Diffstat (limited to 'proto')
-rw-r--r--proto/bgp/bgp.c4
-rw-r--r--proto/bgp/bgp.h1
-rw-r--r--proto/pipe/pipe.c8
3 files changed, 6 insertions, 7 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index cf743dff..95dbe477 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -1165,9 +1165,9 @@ bgp_show_proto_info(struct proto *P)
p->rs_client ? " route-server" : "",
p->as4_session ? " AS4" : "");
cli_msg(-1006, " Source address: %I", p->source_addr);
- if (p->cf->route_limit)
+ if (P->cf->in_limit)
cli_msg(-1006, " Route limit: %d/%d",
- p->p.stats.imp_routes, p->cf->route_limit);
+ p->p.stats.imp_routes, P->cf->in_limit->limit);
cli_msg(-1006, " Hold timer: %d/%d",
tm_remains(c->hold_timer), c->hold_time);
cli_msg(-1006, " Keepalive timer: %d/%d",
diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h
index aa2db4b0..1c16f485 100644
--- a/proto/bgp/bgp.h
+++ b/proto/bgp/bgp.h
@@ -40,7 +40,6 @@ struct bgp_config {
int rr_client; /* Whether neighbor is RR client of me */
int rs_client; /* Whether neighbor is RS client of me */
int advertise_ipv4; /* Whether we should add IPv4 capability advertisement to OPEN message */
- u32 route_limit; /* Number of routes that may be imported, 0 means disable limit */
int passive; /* Do not initiate outgoing connection */
int interpret_communities; /* Hardwired handling of well-known communities */
unsigned connect_retry_time;
diff --git a/proto/pipe/pipe.c b/proto/pipe/pipe.c
index a5fcc6f6..41bac474 100644
--- a/proto/pipe/pipe.c
+++ b/proto/pipe/pipe.c
@@ -127,10 +127,8 @@ pipe_reload_routes(struct proto *P)
*/
proto_request_feeding(P);
- if (P->main_ahook->in_limit)
- P->main_ahook->in_limit->active = 0;
- if (p->peer_ahook->in_limit)
- p->peer_ahook->in_limit->active = 0;
+ proto_reset_limit(P->main_ahook->in_limit);
+ proto_reset_limit(p->peer_ahook->in_limit);
return 1;
}
@@ -168,10 +166,12 @@ pipe_start(struct proto *P)
P->main_ahook = proto_add_announce_hook(P, P->table, &P->stats);
P->main_ahook->out_filter = cf->c.out_filter;
P->main_ahook->in_limit = cf->c.in_limit;
+ proto_reset_limit(P->main_ahook->in_limit);
p->peer_ahook = proto_add_announce_hook(P, p->peer_table, &p->peer_stats);
p->peer_ahook->out_filter = cf->c.in_filter;
p->peer_ahook->in_limit = cf->out_limit;
+ proto_reset_limit(p->peer_ahook->in_limit);
return PS_UP;
}