diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-07-10 22:27:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-10 22:27:24 +0200 |
commit | fa683238113181fe7a83161ce02725e6abee0eaf (patch) | |
tree | b195f0ebc40838150203ba6b00777ecd179edb6e | |
parent | Merge pull request #4619 from opensourcerouting/eigrpd-yang (diff) | |
parent | bgpd: honor max prefix timer on inbound sessions (diff) | |
download | frr-fa683238113181fe7a83161ce02725e6abee0eaf.tar.xz frr-fa683238113181fe7a83161ce02725e6abee0eaf.zip |
Merge pull request #4675 from mgsmith1000/bgp_restart_timer_inbound
bgpd: honor max prefix timer on inbound sessions
-rw-r--r-- | bgpd/bgp_network.c | 11 |
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); |