diff options
| author | rathorepo <rathorepo@vmware.com> | 2024-04-18 09:53:36 +0000 |
|---|---|---|
| committer | rathorepo <rathorepo@vmware.com> | 2024-04-29 08:33:04 +0000 |
| commit | fd8d42099953f4b589f08d5ef1b5890c278f51be (patch) | |
| tree | 3e2246ea3516428705e1537b7f1c5b2f4738a28b | |
| parent | 27cc9ae508ad11107a3d9c446838870433d1f503 (diff) | |
bgpd : Ensure logging for dynamic neighbor listen limit reached
Dynamic neighbors exceeding the listen limit were rejected without appropriate logging.
Previously, only rejection logs were generated, leaving users unaware of when the limit being reached.
Adding a log message for when the listen limit is reached
Signed-off-by: Pooja Rathore <rathorepo@vmware.com>
| -rw-r--r-- | bgpd/bgpd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index d98df754ef..dbf8c3121d 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -4403,6 +4403,11 @@ struct peer *peer_lookup_dynamic_neighbor(struct bgp *bgp, union sockunion *su) zlog_debug("%s Dynamic Neighbor added, group %s count %d", peer->host, group->name, dncount); + if (dncount == gbgp->dynamic_neighbors_limit) { + zlog_warn("Dynamic Neighbor %s added as last connection. Peer-group %s reached maximum listen limit %d", + peer->host, group->name, + gbgp->dynamic_neighbors_limit); + } return peer; } |
