summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_network.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index 8e18ed752..1dadf00e8 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -440,6 +440,17 @@ static int bgp_accept(struct thread *thread)
return -1;
}
+ /* Check whether max prefix restart timer is set for the peer */
+ if (peer1->t_pmax_restart) {
+ if (bgp_debug_neighbor_events(peer1))
+ zlog_debug(
+ "%s - incoming conn rejected - "
+ "peer max prefix timer is active",
+ peer1->host);
+ close(bgp_sock);
+ return -1;
+ }
+
if (bgp_debug_neighbor_events(peer1))
zlog_debug("[Event] BGP connection from host %s fd %d",
inet_sutop(&su, buf), bgp_sock);